checkout_sdk 2.4.0 → 2.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c6ddde9012cab748f19899933a93f9102807140f0f6ddd043de10b2af1c5331
4
- data.tar.gz: 3b101a19818d2c987f0dbbff00aedb5c213391edfc79a9f2b710491fc6b4ae19
3
+ metadata.gz: 1b407e28ff0b39c99b367549f0a8936f08cdab77844dbbaae25120131b7a68fc
4
+ data.tar.gz: a51e29d577617ba5c4a36e288df85b6fd03e2184b0f9a7f85db86455258079a0
5
5
  SHA512:
6
- metadata.gz: fa721cccaad4523065d5c9941a65b07198ed0da224a667308dbebee847dc03b5fb7affb6520e3aa2c84f142953fdf1fd72020dad06378fec1cfaef775d24ca0a
7
- data.tar.gz: dd9a1bbf04c7c5fa4508dfd0e6c27ecf2528bbd0b8e4bce0f16fc1d2171ce4f34cbf6e161f3bd51561a510cbf167ce98ac24f91a5bde168cbce9d0d6f894be68
6
+ metadata.gz: aaf583699b582fdcd33dc32e5178870074b874427ce2a032a0919ef472d8e59ae9627824affffb185a11735607a310a52dabfb5fa52bd10371a715137e128226
7
+ data.tar.gz: 60331bb9c0b309e98f738d1bbc140fa648c6b75c4a75ebc442f5bd406bcca6cfd343c1bbad8817d894ca6657d03c00f08da9a3f7c084a6e3c86caf1dfc8bd3a9
@@ -93,7 +93,10 @@ module CheckoutSdk
93
93
  # @param [CardUpdateHeaders, nil] headers the optional return-encrypted-cvv and
94
94
  # Encryption-Key HTTP headers. Setting return_encrypted_cvv without encryption_key returns
95
95
  # a 422 with error code encryption_key_required.
96
- # @return [OpenStruct] the update response, carrying encrypted_cvv when requested
96
+ # @return [OpenStruct] the update response, carrying encrypted_cvv when requested. For a
97
+ # virtual card the response may also carry is_single_use (boolean, default false),
98
+ # specifying whether the card is set to expire after a single use. Physical cards never
99
+ # send it.
97
100
  def update_card(card_id, update_card_request, headers = nil)
98
101
  api_client.invoke_patch(
99
102
  build_path(ISSUING, CARDS, card_id),
@@ -39,14 +39,21 @@ module CheckoutSdk
39
39
  # Example: 2026-06-01T10:00Z
40
40
  # @return [String]
41
41
  # @!attribute revocation_date
42
- # Date scheduling the card's automatic revocation.
43
- # [Optional]
44
- # Format: yyyy-MM-dd (time is midnight UTC)
45
- # Example: 2027-03-12
46
- # @return [String]
42
+ # @return [String] Date for the card to be automatically revoked, in the form `yyyy-mm-dd`.
43
+ # Must be after the current date. Maps swagger `IssuingRevocationDate`.
44
+ # @deprecated Use {#scheduled_revocation_date} instead.
45
+ # @!attribute scheduled_revocation_date
46
+ # @return [String] Date for the card to be automatically revoked, in the form `yyyy-mm-dd`.
47
+ # Overrides the deprecated {#revocation_date} when both are given. Maps swagger
48
+ # `IssuingScheduledRevocationDate`.
49
+ # @!attribute status
50
+ # @return [String] Set to `active` to reactivate an `inactive` or `suspended` card.
51
+ # Mutually exclusive with `scheduled_activation_date`: submitting both returns a
52
+ # `scheduled_activation_date_conflicts_with_activation` error. The only supported
53
+ # value is `active`.
47
54
  class UpdateCardRequest
48
55
  attr_accessor :reference, :metadata, :expiry_month, :expiry_year,
49
- :scheduled_activation_date, :revocation_date
56
+ :scheduled_activation_date, :revocation_date, :scheduled_revocation_date, :status
50
57
  end
51
58
  end
52
59
  end
@@ -0,0 +1,160 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # Contains information about the accommodation booked by the customer.
6
+ #
7
+ # Maps the swagger `AccommodationData` schema, which `POST /payments`, the
8
+ # `GET /payments/{id}` response and `PaymentContextProcessing` all resolve to.
9
+ #
10
+ # `property_phone` and `customer_service_phone` are declared on `AccommodationData` only.
11
+ # The `PaymentInterfacesProcessingAccommodationData` schema used by hosted payments, payment
12
+ # links and payment sessions carries the other eleven properties but neither phone array, so
13
+ # those two are read on `POST /payments` and payment contexts and ignored elsewhere.
14
+ #
15
+ # @!attribute name
16
+ # @return [String] The name of the accommodation.
17
+ # [Optional]
18
+ # Example: "The Sea View Hotel"
19
+ # @!attribute booking_reference
20
+ # @return [String] The booking reference for the stay.
21
+ # [Optional]
22
+ # Example: "HOTEL123"
23
+ # @!attribute check_in_date
24
+ # @return [String] The date the customer checks in.
25
+ # [Optional]
26
+ # Format: date (YYYY-MM-DD)
27
+ # Example: "2023-06-20"
28
+ # @!attribute check_out_date
29
+ # @return [String] The date the customer checks out.
30
+ # [Optional]
31
+ # Format: date (YYYY-MM-DD)
32
+ # Example: "2023-06-23"
33
+ # @!attribute address
34
+ # @return [AccommodationAddress] The address of the accommodation.
35
+ # [Optional]
36
+ # @!attribute state
37
+ # @return [String] The state or region the accommodation is in.
38
+ # [Optional]
39
+ # A plain string, not a country code. Example: "FL"
40
+ # @!attribute country
41
+ # @return [String] The country the accommodation is in.
42
+ # [Optional]
43
+ # A plain string, not an ISO 3166-1 alpha-2 code: the specification's own example is the
44
+ # three-letter "USA", which no alpha-2 enum can hold. Example: "USA"
45
+ # @!attribute city
46
+ # @return [String] The city the accommodation is in.
47
+ # [Optional]
48
+ # Example: "Los Angeles"
49
+ # @!attribute number_of_rooms
50
+ # @return [Integer] The number of rooms booked.
51
+ # [Optional]
52
+ # Example: 2
53
+ # @!attribute guests
54
+ # @return [Array(AccommodationGuest)] The guests staying at the accommodation.
55
+ # [Optional]
56
+ # @!attribute room
57
+ # @return [Array(AccommodationRoom)] The rooms booked by the customer.
58
+ # [Optional]
59
+ # Named `room` in the singular by the specification, and it is an array.
60
+ # @!attribute property_phone
61
+ # @return [Array(AccommodationPhone)] Phone numbers for the property.
62
+ # [Optional]
63
+ # Declared on `AccommodationData` only.
64
+ # @!attribute customer_service_phone
65
+ # @return [Array(AccommodationPhone)] Customer service phone numbers for the property.
66
+ # [Optional]
67
+ # Declared on `AccommodationData` only.
68
+ class AccommodationData
69
+ attr_accessor :name,
70
+ :booking_reference,
71
+ :check_in_date,
72
+ :check_out_date,
73
+ :address,
74
+ :state,
75
+ :country,
76
+ :city,
77
+ :number_of_rooms,
78
+ :guests,
79
+ :room,
80
+ :property_phone,
81
+ :customer_service_phone
82
+ end
83
+
84
+ # Partial address information for an accommodation.
85
+ #
86
+ # The specification declares exactly these two properties, so this is deliberately not the
87
+ # wide {CheckoutSdk::Common::Address}.
88
+ #
89
+ # @!attribute address_line1
90
+ # @return [String] The first line of the address.
91
+ # [Optional]
92
+ # Example: "123 Beach Road"
93
+ # @!attribute zip
94
+ # @return [String] The postal code of the address.
95
+ # [Optional]
96
+ # Example: "10001"
97
+ class AccommodationAddress
98
+ attr_accessor :address_line1,
99
+ :zip
100
+ end
101
+
102
+ # A guest staying at the accommodation.
103
+ #
104
+ # @!attribute first_name
105
+ # @return [String] The guest's first name.
106
+ # [Optional]
107
+ # Example: "Jane"
108
+ # @!attribute last_name
109
+ # @return [String] The guest's last name.
110
+ # [Optional]
111
+ # Example: "Doe"
112
+ # @!attribute date_of_birth
113
+ # @return [String] The guest's date of birth.
114
+ # [Optional]
115
+ # Format: date (YYYY-MM-DD)
116
+ # Example: "1985-07-14"
117
+ class AccommodationGuest
118
+ attr_accessor :first_name,
119
+ :last_name,
120
+ :date_of_birth
121
+ end
122
+
123
+ # A room booked at the accommodation.
124
+ #
125
+ # Both properties are strings in this schema. The payment setups equivalent,
126
+ # {PaymentSetupAccommodationRoom}, declares a numeric `rate` and an integer
127
+ # `number_of_nights` instead, so the two are not interchangeable.
128
+ #
129
+ # @!attribute rate
130
+ # @return [String] The nightly rate for the room.
131
+ # [Optional]
132
+ # A string, not a number. Example: "70"
133
+ # @!attribute number_of_nights_at_room_rate
134
+ # @return [String] The number of nights booked at that rate.
135
+ # [Optional]
136
+ # A string, not an integer. Example: "3"
137
+ class AccommodationRoom
138
+ attr_accessor :rate,
139
+ :number_of_nights_at_room_rate
140
+ end
141
+
142
+ # A phone number for an accommodation property.
143
+ #
144
+ # The specification declares exactly these two properties, so this is deliberately not the
145
+ # wide {CheckoutSdk::Common::Phone}.
146
+ #
147
+ # @!attribute country_code
148
+ # @return [String] The international dialling code.
149
+ # [Optional]
150
+ # Example: "44"
151
+ # @!attribute number
152
+ # @return [String] The phone number.
153
+ # [Optional]
154
+ # Example: "7123456789"
155
+ class AccommodationPhone
156
+ attr_accessor :country_code,
157
+ :number
158
+ end
159
+ end
160
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # Which ACH service to use for the payment, when `source.type` is `ach`.
6
+ #
7
+ # Named after the .NET `AchServiceType` enum and the PHP doc reference, which map the same
8
+ # property.
9
+ module AchServiceType
10
+ SAME_DAY = 'same_day'
11
+ STANDARD = 'standard'
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # Information about the payment aggregator.
6
+ #
7
+ # Maps the swagger `Aggregator` schema. Named after the schema, unlike .NET which calls its
8
+ # equivalent `ProcessingAggregator`; Ruby has no name collision here.
9
+ #
10
+ # @!attribute sub_merchant_id
11
+ # @return [String] The sub-merchant ID.
12
+ # [Optional]
13
+ # Example: "9cf70789ba90123"
14
+ # @!attribute aggregator_id_visa
15
+ # @return [String] The Visa identifier for the payment aggregator.
16
+ # [Optional]
17
+ # Example: "10012345"
18
+ # @!attribute aggregator_id_mc
19
+ # @return [String] The Mastercard identifier for the payment aggregator.
20
+ # [Optional]
21
+ # Example: "00000123456"
22
+ class Aggregator
23
+ attr_accessor :sub_merchant_id,
24
+ :aggregator_id_visa,
25
+ :aggregator_id_mc
26
+ end
27
+ end
28
+ end
@@ -2,12 +2,46 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
+ # Contains information about the airline ticket and flights booked by the customer.
6
+ #
7
+ # Maps the swagger `AirlineData` schema, which `POST /payments`, the `GET /payments/{id}`
8
+ # response and `PaymentContextProcessing` all resolve to, and the
9
+ # `PaymentInterfacesProcessingAirlineData` schema used by hosted payments, payment links and
10
+ # payment sessions. The two declare the same three properties.
11
+ #
5
12
  # @!attribute ticket
6
- # @return [Ticket]
13
+ # @return [Ticket] Contains information about the airline ticket.
14
+ # [Optional]
15
+ # A single object, not a collection.
7
16
  # @!attribute passenger
8
- # @return [Passenger]
17
+ # @return [Passenger, Array(Passenger)] Contains information about the passenger or
18
+ # passengers on the flight.
19
+ # [Optional]
20
+ #
21
+ # Accepts either a single {Passenger} or an array of them, and the choice is not
22
+ # cosmetic. Verified against the sandbox on 2026-09-25:
23
+ #
24
+ # | Surface | object | array |
25
+ # |--------------------------|--------|-------|
26
+ # | POST /payments | 201 | 201 |
27
+ # | POST /hosted-payments | 201 | 422 |
28
+ # | POST /payment-links | 201 | 422 |
29
+ # | POST /payment-contexts | 201 | 422 |
30
+ #
31
+ # So assign a single {Passenger} for one passenger: that is accepted on every request
32
+ # surface. Assign an array only for two or more, and only on `POST /payments`, which is
33
+ # the sole surface that takes it. Leave the attribute unset when there are no passengers:
34
+ # an empty array and an explicit null are both rejected with
35
+ # `processing_airline_data_0_passenger_invalid`.
36
+ #
37
+ # This inverts the specification, which declares the property array-only on `AirlineData`
38
+ # and `oneOf[array, object]` on `PaymentInterfacesProcessingAirlineData`. The array branch
39
+ # does not exist in practice on three of the four surfaces. Responses may carry either
40
+ # shape, so read defensively.
9
41
  # @!attribute flight_leg_details
10
- # @return [Array(FlightLegDetails)]
42
+ # @return [Array(FlightLegDetails)] Contains information about the flight legs booked by the
43
+ # customer.
44
+ # [Optional]
11
45
  class AirlineData
12
46
  attr_accessor :ticket,
13
47
  :passenger,
@@ -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.5.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checkout_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Checkout
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-09-24 00:00:00.000000000 Z
11
+ date: 2026-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -448,6 +448,9 @@ files:
448
448
  - lib/checkout_sdk/payment_methods/payment_methods.rb
449
449
  - lib/checkout_sdk/payment_methods/payment_methods_client.rb
450
450
  - lib/checkout_sdk/payment_methods/payment_methods_query.rb
451
+ - lib/checkout_sdk/payments/accommodation_data.rb
452
+ - lib/checkout_sdk/payments/ach_service_type.rb
453
+ - lib/checkout_sdk/payments/aggregator.rb
451
454
  - lib/checkout_sdk/payments/airline_data.rb
452
455
  - lib/checkout_sdk/payments/apple_pay/apple_pay_certificate_request.rb
453
456
  - lib/checkout_sdk/payments/apple_pay/apple_pay_client.rb
@@ -493,7 +496,9 @@ files:
493
496
  - lib/checkout_sdk/payments/merchant_initiated_reason.rb
494
497
  - lib/checkout_sdk/payments/network_token_type.rb
495
498
  - lib/checkout_sdk/payments/os_type.rb
499
+ - lib/checkout_sdk/payments/pan_processed_type.rb
496
500
  - lib/checkout_sdk/payments/partial_authorization.rb
501
+ - lib/checkout_sdk/payments/partner_customer_risk_data.rb
497
502
  - lib/checkout_sdk/payments/passenger.rb
498
503
  - lib/checkout_sdk/payments/payer.rb
499
504
  - lib/checkout_sdk/payments/payment_instruction.rb
@@ -549,6 +554,7 @@ files:
549
554
  - lib/checkout_sdk/payments/previous/source/network_token_source.rb
550
555
  - lib/checkout_sdk/payments/previous/source/payment_source.rb
551
556
  - lib/checkout_sdk/payments/previous/source/token_source.rb
557
+ - lib/checkout_sdk/payments/processing_card_type.rb
552
558
  - lib/checkout_sdk/payments/processing_data.rb
553
559
  - lib/checkout_sdk/payments/processing_settings.rb
554
560
  - lib/checkout_sdk/payments/product.rb
@@ -567,7 +573,6 @@ files:
567
573
  - lib/checkout_sdk/payments/sender/sender_information.rb
568
574
  - lib/checkout_sdk/payments/sender/sender_type.rb
569
575
  - lib/checkout_sdk/payments/sender/source_of_funds.rb
570
- - lib/checkout_sdk/payments/sender/ticket.rb
571
576
  - lib/checkout_sdk/payments/sessions/payment_methods_type.rb
572
577
  - lib/checkout_sdk/payments/sessions/payment_sessions_client.rb
573
578
  - lib/checkout_sdk/payments/sessions/payment_sessions_request.rb
@@ -665,6 +670,7 @@ files:
665
670
  - lib/checkout_sdk/payments/terminal_type.rb
666
671
  - lib/checkout_sdk/payments/three_ds_flow_type.rb
667
672
  - lib/checkout_sdk/payments/three_ds_request.rb
673
+ - lib/checkout_sdk/payments/ticket.rb
668
674
  - lib/checkout_sdk/payments/user_action.rb
669
675
  - lib/checkout_sdk/payments/void_request.rb
670
676
  - lib/checkout_sdk/platform_type.rb
@@ -1,23 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module CheckoutSdk
4
- module Payments
5
- # @!attribute number
6
- # @return [String]
7
- # @!attribute issue_date
8
- # @return [String]
9
- # @!attribute issuing_carrier_code
10
- # @return [String]
11
- # @!attribute travel_agency_name
12
- # @return [String]
13
- # @!attribute travel_agency_code
14
- # @return [String]
15
- class Ticket
16
- attr_accessor :number,
17
- :issue_date,
18
- :issuing_carrier_code,
19
- :travel_agency_name,
20
- :travel_agency_code
21
- end
22
- end
23
- end