checkout_sdk 2.4.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/lib/checkout_sdk/accounts/accounts.rb +8 -0
  3. data/lib/checkout_sdk/accounts/accounts_client.rb +35 -9
  4. data/lib/checkout_sdk/accounts/additional_document.rb +6 -0
  5. data/lib/checkout_sdk/accounts/additional_info.rb +5 -0
  6. data/lib/checkout_sdk/accounts/agreed_terms.rb +14 -1
  7. data/lib/checkout_sdk/accounts/articles_of_association.rb +8 -1
  8. data/lib/checkout_sdk/accounts/articles_of_association_type.rb +1 -0
  9. data/lib/checkout_sdk/accounts/bank_verification.rb +8 -1
  10. data/lib/checkout_sdk/accounts/bank_verification_type.rb +1 -0
  11. data/lib/checkout_sdk/accounts/business_type.rb +2 -0
  12. data/lib/checkout_sdk/accounts/certified_authorised_signatory.rb +24 -0
  13. data/lib/checkout_sdk/accounts/certified_authorised_signatory_type.rb +10 -0
  14. data/lib/checkout_sdk/accounts/citizenship.rb +6 -1
  15. data/lib/checkout_sdk/accounts/company.rb +54 -1
  16. data/lib/checkout_sdk/accounts/company_position.rb +1 -0
  17. data/lib/checkout_sdk/accounts/company_verification.rb +9 -0
  18. data/lib/checkout_sdk/accounts/company_verification_type.rb +3 -0
  19. data/lib/checkout_sdk/accounts/contact_details.rb +18 -0
  20. data/lib/checkout_sdk/accounts/date_of_birth.rb +10 -0
  21. data/lib/checkout_sdk/accounts/date_of_incorporation.rb +10 -0
  22. data/lib/checkout_sdk/accounts/document.rb +12 -0
  23. data/lib/checkout_sdk/accounts/document_type.rb +1 -0
  24. data/lib/checkout_sdk/accounts/entity_document.rb +5 -0
  25. data/lib/checkout_sdk/accounts/entity_email_addresses.rb +12 -1
  26. data/lib/checkout_sdk/accounts/entity_files_request.rb +4 -3
  27. data/lib/checkout_sdk/accounts/entity_financial_details.rb +15 -0
  28. data/lib/checkout_sdk/accounts/entity_financial_documents.rb +5 -0
  29. data/lib/checkout_sdk/accounts/entity_roles.rb +1 -0
  30. data/lib/checkout_sdk/accounts/file_purpose.rb +24 -0
  31. data/lib/checkout_sdk/accounts/file_request.rb +7 -0
  32. data/lib/checkout_sdk/accounts/financial_statements.rb +9 -1
  33. data/lib/checkout_sdk/accounts/financial_statements_type.rb +2 -0
  34. data/lib/checkout_sdk/accounts/financial_verification.rb +11 -3
  35. data/lib/checkout_sdk/accounts/financial_verification_type.rb +2 -0
  36. data/lib/checkout_sdk/accounts/identification.rb +7 -0
  37. data/lib/checkout_sdk/accounts/individual.rb +26 -0
  38. data/lib/checkout_sdk/accounts/invitee.rb +6 -0
  39. data/lib/checkout_sdk/accounts/national_id_type.rb +1 -0
  40. data/lib/checkout_sdk/accounts/onboard_entity.rb +30 -3
  41. data/lib/checkout_sdk/accounts/onboard_sub_entity_documents.rb +38 -1
  42. data/lib/checkout_sdk/accounts/phone.rb +7 -1
  43. data/lib/checkout_sdk/accounts/place_of_birth.rb +4 -0
  44. data/lib/checkout_sdk/accounts/processing_details.rb +27 -0
  45. data/lib/checkout_sdk/accounts/processing_details_ach.rb +14 -1
  46. data/lib/checkout_sdk/accounts/processing_details_payments.rb +3 -1
  47. data/lib/checkout_sdk/accounts/profile.rb +14 -0
  48. data/lib/checkout_sdk/accounts/proof_of_legality.rb +8 -1
  49. data/lib/checkout_sdk/accounts/proof_of_legality_type.rb +1 -0
  50. data/lib/checkout_sdk/accounts/proof_of_principal_address.rb +10 -3
  51. data/lib/checkout_sdk/accounts/proof_of_principal_address_type.rb +3 -0
  52. data/lib/checkout_sdk/accounts/proof_of_registration.rb +22 -0
  53. data/lib/checkout_sdk/accounts/proof_of_registration_type.rb +11 -0
  54. data/lib/checkout_sdk/accounts/proof_of_residential_address.rb +22 -0
  55. data/lib/checkout_sdk/accounts/proof_of_residential_address_type.rb +12 -0
  56. data/lib/checkout_sdk/accounts/representative.rb +67 -4
  57. data/lib/checkout_sdk/accounts/representative_documents.rb +43 -0
  58. data/lib/checkout_sdk/accounts/representative_individual.rb +35 -2
  59. data/lib/checkout_sdk/accounts/shareholder_structure.rb +9 -1
  60. data/lib/checkout_sdk/accounts/shareholder_structure_type.rb +1 -0
  61. data/lib/checkout_sdk/accounts/submitter.rb +4 -3
  62. data/lib/checkout_sdk/accounts/tax_verification.rb +8 -0
  63. data/lib/checkout_sdk/accounts/tax_verification_type.rb +1 -0
  64. data/lib/checkout_sdk/accounts/update_payment_instrument_request.rb +13 -1
  65. data/lib/checkout_sdk/issuing/issuing_client.rb +4 -1
  66. data/lib/checkout_sdk/issuing/update_card_request.rb +13 -6
  67. data/lib/checkout_sdk/payments/accommodation_data.rb +160 -0
  68. data/lib/checkout_sdk/payments/ach_service_type.rb +14 -0
  69. data/lib/checkout_sdk/payments/aggregator.rb +28 -0
  70. data/lib/checkout_sdk/payments/airline_data.rb +37 -3
  71. data/lib/checkout_sdk/payments/flight_leg_details.rb +39 -13
  72. data/lib/checkout_sdk/payments/pan_processed_type.rb +15 -0
  73. data/lib/checkout_sdk/payments/partner_customer_risk_data.rb +23 -0
  74. data/lib/checkout_sdk/payments/passenger.rb +24 -7
  75. data/lib/checkout_sdk/payments/payments.rb +7 -1
  76. data/lib/checkout_sdk/payments/processing_card_type.rb +17 -0
  77. data/lib/checkout_sdk/payments/processing_data.rb +4 -4
  78. data/lib/checkout_sdk/payments/processing_settings.rb +249 -55
  79. data/lib/checkout_sdk/payments/ticket.rb +46 -0
  80. data/lib/checkout_sdk/version.rb +1 -1
  81. metadata +17 -3
  82. data/lib/checkout_sdk/payments/sender/ticket.rb +0 -23
@@ -2,33 +2,59 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
+ # Contains information about a flight leg booked by the customer.
6
+ #
7
+ # Maps the inline `flight_leg_details` item on the swagger `AirlineData` and
8
+ # `PaymentInterfacesProcessingAirlineData` schemas, and `PaymentSetupFlightLegDetails` for
9
+ # payment setups. All three declare the same nine properties with the same spelling, which is
10
+ # why one class serves the payments and the setups paths.
11
+ #
5
12
  # @!attribute flight_number
6
- # @return [Integer]
13
+ # @return [String] The flight number.
14
+ # [Optional]
15
+ # Example: "101"
7
16
  # @!attribute carrier_code
8
- # @return [String]
9
- # @!attribute service_class
10
- # @return [String]
17
+ # @return [String] The IATA carrier code.
18
+ # [Optional]
19
+ # Example: "BA"
20
+ # @!attribute class_of_travelling
21
+ # @return [String] The fare class of the leg.
22
+ # [Optional]
23
+ # Example: "J"
11
24
  # @!attribute departure_date
12
- # @return [String]
25
+ # @return [String] The date the flight departs.
26
+ # [Optional]
27
+ # Format: date (YYYY-MM-DD)
28
+ # Example: "2023-06-19"
13
29
  # @!attribute departure_time
14
- # @return [String]
30
+ # @return [String] The local time the flight departs.
31
+ # [Optional]
32
+ # Example: "15:30"
15
33
  # @!attribute departure_airport
16
- # @return [String]
34
+ # @return [String] The IATA code of the departure airport.
35
+ # [Optional]
36
+ # Example: "LHR"
17
37
  # @!attribute arrival_airport
18
- # @return [String]
19
- # @!attribute stopover_code
20
- # @return [String]
38
+ # @return [String] The IATA code of the arrival airport.
39
+ # [Optional]
40
+ # Example: "LAX"
41
+ # @!attribute stop_over_code
42
+ # @return [String] Whether a stopover is permitted on the leg.
43
+ # [Optional]
44
+ # Example: "x"
21
45
  # @!attribute fare_basis_code
22
- # @return [String]
46
+ # @return [String] The fare basis code for the leg.
47
+ # [Optional]
48
+ # Example: "SPRSVR"
23
49
  class FlightLegDetails
24
50
  attr_accessor :flight_number,
25
51
  :carrier_code,
26
- :service_class,
52
+ :class_of_travelling,
27
53
  :departure_date,
28
54
  :departure_time,
29
55
  :departure_airport,
30
56
  :arrival_airport,
31
- :stopover_code,
57
+ :stop_over_code,
32
58
  :fare_basis_code
33
59
  end
34
60
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # The preferred type of Primary Account Number (PAN) for the payment.
6
+ #
7
+ # Named after the .NET `PanProcessedType` enum, which maps the same property.
8
+ module PanProcessedType
9
+ # Indicates a preference for using the full card number.
10
+ FPAN = 'fpan'
11
+ # Indicates a preference for using the Checkout.com Network Token.
12
+ DPAN = 'dpan'
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # A key-and-value pair with merchant-specific data for the transaction.
6
+ #
7
+ # The specification describes `partner_customer_risk_data` as "an array of key-and-value
8
+ # pairs" but declares it as a single inline object with `key` and `value`. The description and
9
+ # the declared type disagree; this class models the declared shape, which is what the gateway
10
+ # validates against.
11
+ #
12
+ # @!attribute key
13
+ # @return [String] The key for the pair.
14
+ # [Optional]
15
+ # @!attribute value
16
+ # @return [String] The value for the pair.
17
+ # [Optional]
18
+ class PartnerCustomerRiskData
19
+ attr_accessor :key,
20
+ :value
21
+ end
22
+ end
23
+ end
@@ -2,17 +2,29 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
- # Contains information about a passenger on the flight
6
- # (PaymentInterfacesProcessingAirlinePassengerData).
5
+ # Contains information about a passenger on the flight.
6
+ #
7
+ # Maps the inline `passenger` item on the swagger `AirlineData` and
8
+ # `PaymentInterfacesProcessingAirlineData` schemas. See {AirlineData#passenger} for the
9
+ # cardinality rule: a single object is accepted on every request surface, an array only on
10
+ # POST /payments.
7
11
  #
8
12
  # @!attribute first_name
9
- # @return [String]
13
+ # @return [String] The passenger's first name.
14
+ # [Optional]
15
+ # Example: "John"
10
16
  # @!attribute last_name
11
- # @return [String]
17
+ # @return [String] The passenger's last name.
18
+ # [Optional]
19
+ # Example: "White"
12
20
  # @!attribute date_of_birth
13
- # @return [String] Format: YYYY-MM-DD
21
+ # @return [String] The passenger's date of birth.
22
+ # [Optional]
23
+ # Format: date (YYYY-MM-DD)
24
+ # Example: "1990-05-26"
14
25
  # @!attribute address
15
- # @return [PassengerAddress]
26
+ # @return [PassengerAddress] Contains information about the passenger's address.
27
+ # [Optional]
16
28
  class Passenger
17
29
  attr_accessor :first_name,
18
30
  :last_name,
@@ -22,8 +34,13 @@ module CheckoutSdk
22
34
 
23
35
  # Partial address information for an airline passenger.
24
36
  #
37
+ # The specification declares exactly one property here, so this is deliberately not the wide
38
+ # {CheckoutSdk::Common::Address}.
39
+ #
25
40
  # @!attribute country
26
- # @return [String] {CheckoutSdk::Common::Country}
41
+ # @return [String] The two-letter ISO country code of the passenger's country residence.
42
+ # [Optional]
43
+ # Example: "US"
27
44
  class PassengerAddress
28
45
  attr_accessor :country
29
46
  end
@@ -26,6 +26,13 @@ require 'checkout_sdk/payments/capture_type'
26
26
  require 'checkout_sdk/payments/payment_type'
27
27
  require 'checkout_sdk/payments/merchant_initiated_reason'
28
28
  require 'checkout_sdk/payments/preferred_schema'
29
+ require 'checkout_sdk/payments/ticket'
30
+ require 'checkout_sdk/payments/accommodation_data'
31
+ require 'checkout_sdk/payments/aggregator'
32
+ require 'checkout_sdk/payments/partner_customer_risk_data'
33
+ require 'checkout_sdk/payments/pan_processed_type'
34
+ require 'checkout_sdk/payments/ach_service_type'
35
+ require 'checkout_sdk/payments/processing_card_type'
29
36
  require 'checkout_sdk/payments/airline_data'
30
37
  require 'checkout_sdk/payments/risk_request'
31
38
  require 'checkout_sdk/payments/billing_descriptor'
@@ -126,7 +133,6 @@ require 'checkout_sdk/payments/sender/government_sender'
126
133
  require 'checkout_sdk/payments/sender/individual_sender'
127
134
  require 'checkout_sdk/payments/sender/corporate_sender'
128
135
  require 'checkout_sdk/payments/sender/instrument_sender'
129
- require 'checkout_sdk/payments/sender/ticket'
130
136
  require 'checkout_sdk/payments/sender/sender_information'
131
137
 
132
138
  # Destination
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # Whether to process the payment as a credit or debit transaction, when a combo card is used.
6
+ #
7
+ # Deliberately NOT named `CardType`. The specification's values here are lowercase
8
+ # `credit` and `debit`, while every generic card-type enum across the SDK family uses
9
+ # `Credit`/`Debit` or `CREDIT`/`DEBIT`. .NET types this property as its generic `CardType`,
10
+ # whose values are `Credit` and `Debit`, so it sends the wrong casing. Go avoided that by
11
+ # adding a dedicated `ProcessingCardType`; this follows Go.
12
+ module ProcessingCardType
13
+ CREDIT = 'credit'
14
+ DEBIT = 'debit'
15
+ end
16
+ end
17
+ end
@@ -34,7 +34,7 @@ module CheckoutSdk
34
34
  # @!attribute partner_transaction_id
35
35
  # @return [String] [Optional] Unique transaction identification provided by partner.
36
36
  # @!attribute partner_error_codes
37
- # @return [Array<String>] [Optional] The list of error codes that led the payment to fail or
37
+ # @return [Array(String)] [Optional] The list of error codes that led the payment to fail or
38
38
  # be declined, as given by the payment provider.
39
39
  # @!attribute partner_error_message
40
40
  # @return [String] [Optional] Error description provided by partner.
@@ -51,7 +51,7 @@ module CheckoutSdk
51
51
  # additional information about the transaction. For declined transactions it also
52
52
  # indicates whether the payment can be retried and how long to wait.
53
53
  # @!attribute custom_payment_method_ids
54
- # @return [Array<String>] [Optional] An array defining which of the configured payment
54
+ # @return [Array(String)] [Optional] An array defining which of the configured payment
55
55
  # options within a payment category (for example, pay_later or pay_over_time) should be
56
56
  # displayed for this purchase.
57
57
  # @!attribute aft
@@ -84,10 +84,10 @@ module CheckoutSdk
84
84
  # differ from the card's scheme used for the payment if the card is co-badged and the
85
85
  # payment was authorized on a different network. Read-only.
86
86
  # @!attribute accommodation_data
87
- # @return [Array<AccommodationData>] [Optional] Contains information about the accommodation
87
+ # @return [Array(AccommodationData)] [Optional] Contains information about the accommodation
88
88
  # booked by the customer.
89
89
  # @!attribute airline_data
90
- # @return [Array<AirlineData>] [Optional] Contains information about the airline ticket and
90
+ # @return [Array(AirlineData)] [Optional] Contains information about the airline ticket and
91
91
  # flights booked by the customer.
92
92
  # @!attribute scheme_transaction_link_id
93
93
  # @return [String] [Optional] The scheme transaction link identifier. Returned for
@@ -2,81 +2,265 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
+ # Settings that control how the payment is processed.
6
+ #
7
+ # One shared type covering several request shapes: `POST /payments` resolves to
8
+ # `PaymentRequestProcessing`, while hosted payments, payment links and payment sessions
9
+ # resolve to the wider `PaymentInterfacesProcessing`. A property is therefore not necessarily
10
+ # read by every endpoint that accepts this object, and the notes below say which.
11
+ #
12
+ # Attributes marked "not in any request processing schema" are retained for backwards
13
+ # compatibility. The gateway discards them.
14
+ #
5
15
  # @!attribute order_id
6
- # @return [String]
16
+ # @return [String] The number provided by the cardholder. Purchase order or invoice number
17
+ # may be used.
18
+ # [Optional]
19
+ # max 15 characters
20
+ # Example: "123456789"
7
21
  # @!attribute tax_amount
8
- # @return [Integer]
22
+ # @return [Numeric] The total amount of sales tax on the total purchase amount.
23
+ # [Optional]
24
+ # min 0
25
+ # Example: 3000
9
26
  # @!attribute discount_amount
10
- # @return [Integer]
27
+ # @return [Numeric] The discount amount applied to the transaction by the merchant.
28
+ # [Optional]
29
+ # min 0
11
30
  # @!attribute duty_amount
12
- # @return [Integer]
31
+ # @return [Numeric] The total charges for any import or export duty included in the
32
+ # transaction.
33
+ # [Optional]
34
+ # min 0
13
35
  # @!attribute shipping_amount
14
- # @return [Integer]
36
+ # @return [Numeric] The total freight or shipping and handling charges for the transaction.
37
+ # [Optional]
38
+ # min 0
39
+ # Example: 300
15
40
  # @!attribute shipping_tax_amount
16
- # @return [Integer]
41
+ # @return [Numeric] The tax amount of the freight or shipping and handling charges for the
42
+ # transaction.
43
+ # [Optional]
44
+ # min 0
45
+ # Example: 100
46
+ # @!attribute surcharge_amount
47
+ # @return [Integer] Surcharge amount applied to the transaction in minor units by the
48
+ # merchant.
49
+ # [Optional]
50
+ # min 0
51
+ # Example: 200
52
+ # @!attribute original_order_amount
53
+ # @return [Numeric] The payment for a merchant's order may be split, and the original order
54
+ # price indicates the transaction amount of the entire order.
55
+ # [Optional]
56
+ # min 0
57
+ # @!attribute foreign_retailer_amount
58
+ # @return [Integer] The foreign retailer amount the merchant applied to the transaction, in
59
+ # the minor currency unit.
60
+ # [Optional]
61
+ # min 0
62
+ # Example: 200
17
63
  # @!attribute aft
18
- # @return [TrueClass, FalseClass]
64
+ # @return [TrueClass, FalseClass] Indicates if the payment is an Account Funding
65
+ # Transaction.
66
+ # [Optional]
19
67
  # @!attribute preferred_scheme
20
- # @return [String] {PreferredSchema}
68
+ # @return [String] The preferred scheme for co-badged card payment processing. If performing
69
+ # 3DS via a third party, set this value to the scheme that processed 3DS. This field does
70
+ # not support PINless debit schemes in the US (STAR, PULSE, NYCE, ACCEL, SHAZAM).
71
+ # [Optional]
72
+ # One of: mastercard, visa, cartes_bancaires. See {PreferredSchema}
21
73
  # @!attribute merchant_initiated_reason
22
- # @return [String] {MerchantInitiatedReason}
74
+ # @return [String] Indicates the reason for a merchant-initiated payment request.
75
+ # [Optional]
76
+ # One of: Delayed_charge, Resubmission, No_show, Reauthorization.
77
+ # See {MerchantInitiatedReason}
23
78
  # @!attribute campaign_id
24
- # @return [Integer]
79
+ # @return [Integer] Unique number of the campaign this payment will be running in. Only
80
+ # required for Afterpay campaign invoices.
81
+ # [Optional]
25
82
  # @!attribute product_type
26
- # @return [String] {ProductType}
83
+ # @return [String] Product type of the payment. Required when `source.type` is `wechatpay`,
84
+ # optional for `tamara`, required for `sequra`. The accepted values differ per source
85
+ # type. See {ProductType}
86
+ # [Optional]
87
+ # Example: "QR Code"
27
88
  # @!attribute open_id
28
- # @return [String]
29
- # @!attribute original_order_amount
30
- # @return [Integer]
89
+ # @return [String] Value obtained from the WeChat Web Authorization API before initiating
90
+ # Official Account or Mini Program payments. Required if `source.type` is `wechatpay` and
91
+ # `processing.product_type` is `Official Account` or `Mini Program`.
92
+ # [Optional]
93
+ # Example: "oUpF8uMuAJO_M2pxb1Q9zNjWeS6o"
31
94
  # @!attribute receipt_id
32
- # @return [String]
95
+ # @return [String] Merchant receipt ID.
96
+ # [Optional]
97
+ # max 32 characters
98
+ # @!attribute reconciliation_id
99
+ # @return [String] The transaction identifier to track a payment request.
100
+ # [Optional]
101
+ # Example: "4123495123"
33
102
  # @!attribute terminal_type
34
- # @return [String] {TerminalType}
103
+ # @return [String] The client-side terminal type, whether it is a website opened via a PC
104
+ # browser, a mobile browser, or a mobile application.
105
+ # [Optional]
106
+ # One of: APP, WAP, WEB. See {TerminalType}
35
107
  # @!attribute os_type
36
- # @return [String] {OsType}
108
+ # @return [String] The device operating system. Required when `terminal_type` is not `WEB`.
109
+ # [Optional]
110
+ # One of: ANDROID, IOS. See {OsType}
37
111
  # @!attribute invoice_id
38
- # @return [String]
112
+ # @return [String] Invoice ID number.
113
+ # [Optional]
114
+ # max 127 characters
39
115
  # @!attribute brand_name
40
- # @return [String]
116
+ # @return [String] The label that overrides the business name in the PayPal account on the
117
+ # PayPal pages.
118
+ # [Optional]
119
+ # max 127 characters
120
+ # Declared on `PaymentInterfacesProcessing` only.
41
121
  # @!attribute locale
42
- # @return [String]
122
+ # @return [String] The language and region of the customer in ISO 639-2 language code; the
123
+ # value consists of language-country.
124
+ # [Optional]
125
+ # Pattern: ^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}))?$
126
+ # min 2 characters, max 10 characters
127
+ # Example: "en-US"
43
128
  # @!attribute shipping_preference
44
- # @return [String] {ShippingPreference}
129
+ # @return [String] The shipping preference for the payment.
130
+ # [Optional]
131
+ # One of: no_shipping, set_provided_address, get_from_file. See {ShippingPreference}
132
+ # Declared on `PaymentContextProcessing` only, so it is read by POST /payment-contexts.
45
133
  # @!attribute user_action
46
- # @return [String] {UserAction}
47
- # @!attribute set_transaction_context
48
- # @return [Array(Hash{String => String})]
49
- # @!attribute airline_data
50
- # @return [Array(AirlineData)]
51
- # @!attribute otp_value
52
- # @return [String]
134
+ # @return [String] Property required by PayPal to have an appropriate payment flow.
135
+ # [Optional]
136
+ # One of: pay_now, continue. See {UserAction}
137
+ # Declared on `PaymentContextProcessing` only.
138
+ # @!attribute pan_preference
139
+ # @return [String] The preferred type of Primary Account Number (PAN) for the payment. Only
140
+ # works for `source.type` cards, instruments and tokens. `dpan` indicates a preference for
141
+ # the Checkout.com Network Token, `fpan` for the full card number.
142
+ # [Optional]
143
+ # One of: fpan, dpan. See {PanProcessedType}
144
+ # @!attribute provision_network_token
145
+ # @return [TrueClass, FalseClass] Indicates whether to provision a network token for the
146
+ # payment.
147
+ # [Optional]
148
+ # @!attribute card_type
149
+ # @return [String] Specifies whether to process the payment as a credit or debit
150
+ # transaction, if a combo card is used. Required for domestic payments in Brazil performed
151
+ # using a Brazilian card.
152
+ # [Optional]
153
+ # One of: credit, debit. See {ProcessingCardType}
154
+ # @!attribute service_type
155
+ # @return [String] Specifies which ACH service to use for the payment, if you set
156
+ # `source.type` to `ach`.
157
+ # [Optional]
158
+ # One of: same_day, standard. See {AchServiceType}
53
159
  # @!attribute purchase_country
54
- # @return [String] {CheckoutSdk::Common::Country}
160
+ # @return [String] The two-letter ISO country code of the purchase country. If you are a
161
+ # Visa-registered ramp provider operating with affiliates, this field is required.
162
+ # [Optional]
163
+ # max 2 characters
164
+ # Example: "GB". See {CheckoutSdk::Common::Country}
55
165
  # @!attribute custom_payment_method_ids
56
- # @return [Array(String)]
166
+ # @return [Array(String)] Promo codes. They define which of the configured payment options
167
+ # within a payment category (pay_later, pay_over_time, and so on) are shown for this
168
+ # purchase.
169
+ # [Optional]
170
+ # Declared on `PaymentInterfacesProcessing` only.
57
171
  # @!attribute merchant_callback_url
58
- # @return [String]
172
+ # @return [String] A URL which you can use to notify the customer that the order has been
173
+ # created.
174
+ # [Optional]
59
175
  # @!attribute line_of_business
60
- # @return [String]
176
+ # @return [String] Beta. The line of business that the payment is associated with.
177
+ # [Optional]
178
+ # Example: "Flights"
179
+ # @!attribute partner_code
180
+ # @return [String] The customer's 6-digit Blik code. Required when `source.type` is `blik`
181
+ # and `merchant_initiated` is `false`.
182
+ # [Optional]
183
+ # Pattern: ^\d{6}$
184
+ # min 6 characters, max 6 characters
185
+ # Example: "902111"
186
+ # @!attribute scheme_transaction_link_id
187
+ # @return [String] The scheme transaction link identifier.
188
+ # [Optional]
189
+ # @!attribute affiliate_id
190
+ # @return [String] The unique identifier for Visa-registered ramp providers. Must only
191
+ # contain alphanumeric characters. Required if you are a Visa-registered ramp provider
192
+ # operating with affiliates.
193
+ # [Optional]
194
+ # Pattern: ^[a-zA-Z0-9]{1,15}$
195
+ # max 15 characters
196
+ # @!attribute affiliate_url
197
+ # @return [String] The affiliate URL. Required if you are a Visa-registered ramp provider
198
+ # operating with affiliates.
199
+ # [Optional]
200
+ # Example: "www.mycrypto.com"
201
+ # @!attribute aggregator
202
+ # @return [Aggregator] Information about the payment aggregator.
203
+ # [Optional]
204
+ # @!attribute partner_customer_risk_data
205
+ # @return [PartnerCustomerRiskData] Key-and-value pair with merchant-specific data for the
206
+ # transaction.
207
+ # [Optional]
208
+ # Declared on `PaymentInterfacesProcessing` and `PaymentContextProcessing`, not on
209
+ # `PaymentRequestProcessing`.
210
+ # @!attribute airline_data
211
+ # @return [Array(AirlineData)] Contains information about the airline ticket and flights
212
+ # booked by the customer.
213
+ # [Optional]
214
+ # @!attribute accommodation_data
215
+ # @return [Array(AccommodationData)] Contains information about the accommodation booked by
216
+ # the customer.
217
+ # [Optional]
218
+ # @!attribute set_transaction_context
219
+ # @return [Array(Hash{String => String})] Additional transaction context information.
220
+ # [Optional]
221
+ # Not in any request processing schema, in either specification. Serializes as
222
+ # `set_transaction_context`, which no schema defines, so the gateway discards it. Retained
223
+ # for backwards compatibility.
224
+ # @!attribute otp_value
225
+ # @return [String] The one-time password value for authentication.
226
+ # [Optional]
227
+ # Not on `PaymentRequestProcessing` or `PaymentInterfacesProcessing`. It is declared on
228
+ # the payment contexts payment request and on the capture request only, so setting it here
229
+ # has no effect.
61
230
  # @!attribute shipping_delay
62
- # @return [Integer]
231
+ # @return [Integer] The shipping delay in days.
232
+ # [Optional]
233
+ # Not in any request processing schema, in either specification. The gateway discards it.
234
+ # Retained for backwards compatibility.
63
235
  # @!attribute shipping_info
64
- # @return [Array(CheckoutSdk::Common::ShippingInfo)]
236
+ # @return [Array(CheckoutSdk::Common::ShippingInfo)] Additional shipping information for the
237
+ # payment.
238
+ # [Optional]
239
+ # Not in any request processing schema, in either specification. The gateway discards it.
240
+ # Retained for backwards compatibility.
65
241
  # @!attribute dlocal
66
- # @return [DLocalProcessingSettings]
242
+ # @return [DLocalProcessingSettings] dLocal-specific processing settings.
243
+ # [Optional]
244
+ # Previous API (ABC) only. Absent from the current (NAS) processing schemas.
67
245
  # @!attribute senderInformation
68
- # @return [SenderInformation]
246
+ # @return [SenderInformation] Sender information for the payment.
247
+ # [Optional]
248
+ # Not in the current specification. The property appears under neither
249
+ # `senderInformation` nor `sender_information` in any spec available to this workspace,
250
+ # including the live API reference, and no processing schema declares a sender property of
251
+ # any kind. Deprecated in practice; the current API carries sender details in the top
252
+ # level `sender` object on the payment request instead.
253
+ #
254
+ # Left exactly as it is on purpose. Ruby uses attribute names as wire keys verbatim, so
255
+ # this goes out as `senderInformation`. That camelCase spelling is long standing across
256
+ # the SDK family but has never been confirmed against a live ABC endpoint, so treat it as
257
+ # unverified rather than correct, and do not change it in either direction without such a
258
+ # confirmation.
69
259
  # @!attribute purpose
70
- # @return [String]
71
- # @!attribute affiliate_id
72
- # @return [string]
73
- # @!attribute affiliate_url
74
- # @return [string]
75
- # @!attribute partner_code
76
- # @return [String] The customer's 6-digit BLIK code. Required when source.type is "blik"
77
- # and merchant_initiated is false. Pattern: ^\d{6}$
78
- # @!attribute scheme_transaction_link_id
79
- # @return [String] [Optional] The scheme transaction link identifier.
260
+ # @return [String] The purpose of the payment.
261
+ # [Optional]
262
+ # Not declared on any processing schema in either specification. The name appears
263
+ # elsewhere in the spec on unrelated objects. The gateway discards it here.
80
264
  class ProcessingSettings
81
265
  attr_accessor :order_id,
82
266
  :tax_amount,
@@ -84,14 +268,17 @@ module CheckoutSdk
84
268
  :duty_amount,
85
269
  :shipping_amount,
86
270
  :shipping_tax_amount,
271
+ :surcharge_amount,
272
+ :original_order_amount,
273
+ :foreign_retailer_amount,
87
274
  :aft,
88
275
  :preferred_scheme,
89
276
  :merchant_initiated_reason,
90
277
  :campaign_id,
91
278
  :product_type,
92
279
  :open_id,
93
- :original_order_amount,
94
280
  :receipt_id,
281
+ :reconciliation_id,
95
282
  :terminal_type,
96
283
  :os_type,
97
284
  :invoice_id,
@@ -99,22 +286,29 @@ module CheckoutSdk
99
286
  :locale,
100
287
  :shipping_preference,
101
288
  :user_action,
102
- :set_transaction_context,
103
- :airline_data,
104
- :otp_value,
289
+ :pan_preference,
290
+ :provision_network_token,
291
+ :card_type,
292
+ :service_type,
105
293
  :purchase_country,
106
294
  :custom_payment_method_ids,
107
295
  :merchant_callback_url,
108
296
  :line_of_business,
297
+ :partner_code,
298
+ :scheme_transaction_link_id,
299
+ :affiliate_id,
300
+ :affiliate_url,
301
+ :aggregator,
302
+ :partner_customer_risk_data,
303
+ :airline_data,
304
+ :accommodation_data,
305
+ :set_transaction_context,
306
+ :otp_value,
109
307
  :shipping_delay,
110
308
  :shipping_info,
111
309
  :dlocal,
112
310
  :senderInformation,
113
- :purpose,
114
- :affiliate_id,
115
- :affiliate_url,
116
- :partner_code,
117
- :scheme_transaction_link_id
311
+ :purpose
118
312
  end
119
313
  end
120
314
  end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # Contains information about the airline ticket.
6
+ #
7
+ # Maps the inline `ticket` object on the swagger `AirlineData` and
8
+ # `PaymentInterfacesProcessingAirlineData` schemas. Both declare the same six properties.
9
+ #
10
+ # @!attribute number
11
+ # @return [String] The ticket's unique identifier.
12
+ # [Optional]
13
+ # Example: "045-21351455613"
14
+ # @!attribute issue_date
15
+ # @return [String] Date the airline ticket was issued.
16
+ # [Optional]
17
+ # Format: date (YYYY-MM-DD)
18
+ # Example: "2023-05-20"
19
+ # @!attribute issuing_carrier_code
20
+ # @return [String] Carrier code of the ticket issuer.
21
+ # [Optional]
22
+ # Example: "AI"
23
+ # @!attribute travel_package_indicator
24
+ # @return [String] C = Car rental reservation, A = Airline flight reservation,
25
+ # B = Both car rental and airline flight reservations included, N = Unknown.
26
+ # [Optional]
27
+ # Example: "B"
28
+ # @!attribute travel_agency_name
29
+ # @return [String] The name of the travel agency.
30
+ # [Optional]
31
+ # Example: "World Tours"
32
+ # @!attribute travel_agency_code
33
+ # @return [String] The unique identifier from IATA or ARC for the travel agency that
34
+ # issues the ticket.
35
+ # [Optional]
36
+ # Example: "01"
37
+ class Ticket
38
+ attr_accessor :number,
39
+ :issue_date,
40
+ :issuing_carrier_code,
41
+ :travel_package_indicator,
42
+ :travel_agency_name,
43
+ :travel_agency_code
44
+ end
45
+ end
46
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CheckoutSdk
4
- VERSION = '2.4.0'
4
+ VERSION = '2.6.0'
5
5
  end