mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Add missing fields
This commit is contained in:
parent
1fd84c653b
commit
f47245585f
@ -22,6 +22,8 @@ public struct BotPaymentInvoiceFields: OptionSet {
|
|||||||
public static let email = BotPaymentInvoiceFields(rawValue: 1 << 2)
|
public static let email = BotPaymentInvoiceFields(rawValue: 1 << 2)
|
||||||
public static let shippingAddress = BotPaymentInvoiceFields(rawValue: 1 << 3)
|
public static let shippingAddress = BotPaymentInvoiceFields(rawValue: 1 << 3)
|
||||||
public static let flexibleShipping = BotPaymentInvoiceFields(rawValue: 1 << 4)
|
public static let flexibleShipping = BotPaymentInvoiceFields(rawValue: 1 << 4)
|
||||||
|
public static let phoneAvailableToProvider = BotPaymentInvoiceFields(rawValue: 1 << 5)
|
||||||
|
public static let emailAvailableToProvider = BotPaymentInvoiceFields(rawValue: 1 << 6)
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct BotPaymentPrice : Equatable {
|
public struct BotPaymentPrice : Equatable {
|
||||||
@ -128,6 +130,12 @@ extension BotPaymentInvoice {
|
|||||||
if (flags & (1 << 5)) != 0 {
|
if (flags & (1 << 5)) != 0 {
|
||||||
fields.insert(.flexibleShipping)
|
fields.insert(.flexibleShipping)
|
||||||
}
|
}
|
||||||
|
if (flags & (1 << 6)) != 0 {
|
||||||
|
fields.insert(.phoneAvailableToProvider)
|
||||||
|
}
|
||||||
|
if (flags & (1 << 7)) != 0 {
|
||||||
|
fields.insert(.emailAvailableToProvider)
|
||||||
|
}
|
||||||
self.init(isTest: (flags & (1 << 0)) != 0, requestedFields: fields, currency: currency, prices: prices.map {
|
self.init(isTest: (flags & (1 << 0)) != 0, requestedFields: fields, currency: currency, prices: prices.map {
|
||||||
switch $0 {
|
switch $0 {
|
||||||
case let .labeledPrice(label, amount):
|
case let .labeledPrice(label, amount):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user