checkout_sdk 2.3.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 +4 -4
- data/lib/checkout_sdk/api_client.rb +37 -10
- data/lib/checkout_sdk/checkout_api.rb +5 -1
- data/lib/checkout_sdk/identities/address_document_verification/address_document_verification_client.rb +32 -3
- data/lib/checkout_sdk/identities/address_document_verification/address_document_verification_request.rb +13 -3
- data/lib/checkout_sdk/identities/face_authentication/face_authentication_attempt_request.rb +13 -2
- data/lib/checkout_sdk/identities/face_authentication/face_authentication_client.rb +12 -4
- data/lib/checkout_sdk/identities/face_authentication/face_authentication_request.rb +19 -0
- data/lib/checkout_sdk/identities/id_document_verification/id_document_verification_client.rb +33 -3
- data/lib/checkout_sdk/identities/id_document_verification/id_document_verification_request.rb +30 -0
- data/lib/checkout_sdk/identities/identities.rb +8 -0
- data/lib/checkout_sdk/identities/identity_verification/identity_verification_attempt_request.rb +13 -3
- data/lib/checkout_sdk/identities/identity_verification/identity_verification_client.rb +12 -4
- data/lib/checkout_sdk/identities/identity_verification/identity_verification_request.rb +25 -4
- data/lib/checkout_sdk/identities/identity_verification/idv_client_information.rb +17 -3
- data/lib/checkout_sdk/identities/identity_verification/idv_declared_data.rb +16 -3
- data/lib/checkout_sdk/identities/identity_verification/idv_identity_client_information.rb +30 -0
- data/lib/checkout_sdk/identities/identity_verification/idv_identity_declared_data.rb +34 -0
- data/lib/checkout_sdk/identities/idv_address.rb +48 -0
- data/lib/checkout_sdk/identities/idv_attempt_assets_query_filter.rb +24 -0
- data/lib/checkout_sdk/identities/idv_attempts_query_filter.rb +24 -0
- data/lib/checkout_sdk/identities/idv_phone_number.rb +27 -0
- data/lib/checkout_sdk/inventory/inventory.rb +9 -0
- data/lib/checkout_sdk/inventory/inventory_adjustment_request.rb +24 -0
- data/lib/checkout_sdk/inventory/inventory_client.rb +149 -0
- data/lib/checkout_sdk/inventory/inventory_money.rb +19 -0
- data/lib/checkout_sdk/inventory/inventory_reservation_item.rb +20 -0
- data/lib/checkout_sdk/inventory/inventory_reservation_request.rb +27 -0
- data/lib/checkout_sdk/inventory/inventory_set_levels_request.rb +22 -0
- data/lib/checkout_sdk/inventory/inventory_set_product_request.rb +139 -0
- data/lib/checkout_sdk/issuing/card_update_headers.rb +32 -0
- data/lib/checkout_sdk/issuing/issuing.rb +1 -0
- data/lib/checkout_sdk/issuing/issuing_client.rb +13 -2
- data/lib/checkout_sdk/issuing/update_card_request.rb +37 -5
- data/lib/checkout_sdk/payments/accommodation_data.rb +160 -0
- data/lib/checkout_sdk/payments/ach_service_type.rb +14 -0
- data/lib/checkout_sdk/payments/aggregator.rb +28 -0
- data/lib/checkout_sdk/payments/airline_data.rb +37 -3
- data/lib/checkout_sdk/payments/flight_leg_details.rb +39 -13
- data/lib/checkout_sdk/payments/pan_processed_type.rb +15 -0
- data/lib/checkout_sdk/payments/partner_customer_risk_data.rb +23 -0
- data/lib/checkout_sdk/payments/passenger.rb +24 -7
- data/lib/checkout_sdk/payments/payments.rb +7 -1
- data/lib/checkout_sdk/payments/processing_card_type.rb +17 -0
- data/lib/checkout_sdk/payments/processing_data.rb +4 -4
- data/lib/checkout_sdk/payments/processing_settings.rb +249 -55
- data/lib/checkout_sdk/payments/ticket.rb +46 -0
- data/lib/checkout_sdk/version.rb +1 -1
- data/lib/checkout_sdk.rb +1 -0
- metadata +24 -3
- data/lib/checkout_sdk/payments/sender/ticket.rb +0 -23
|
@@ -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 [
|
|
13
|
+
# @return [String] The flight number.
|
|
14
|
+
# [Optional]
|
|
15
|
+
# Example: "101"
|
|
7
16
|
# @!attribute carrier_code
|
|
8
|
-
# @return [String]
|
|
9
|
-
#
|
|
10
|
-
#
|
|
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
|
-
#
|
|
20
|
-
#
|
|
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
|
-
:
|
|
52
|
+
:class_of_travelling,
|
|
27
53
|
:departure_date,
|
|
28
54
|
:departure_time,
|
|
29
55
|
:departure_airport,
|
|
30
56
|
:arrival_airport,
|
|
31
|
-
:
|
|
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
|
-
#
|
|
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]
|
|
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]
|
|
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
|
|
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
|
|
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
|
|
87
|
+
# @return [Array(AccommodationData)] [Optional] Contains information about the accommodation
|
|
88
88
|
# booked by the customer.
|
|
89
89
|
# @!attribute airline_data
|
|
90
|
-
# @return [Array
|
|
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
|