pcp-server-ruby-sdk 1.12.0 → 1.13.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/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/api-definition.yaml +323 -41
- data/lib/PCP-server-Ruby-SDK/endpoints/payment_intent_api_client.rb +37 -0
- data/lib/PCP-server-Ruby-SDK/models/address.rb +9 -237
- data/lib/PCP-server-Ruby-SDK/models/address_personal.rb +10 -246
- data/lib/PCP-server-Ruby-SDK/models/amount_of_money.rb +4 -195
- data/lib/PCP-server-Ruby-SDK/models/api_error.rb +27 -232
- data/lib/PCP-server-Ruby-SDK/models/apple_payment_data_token_header_information.rb +6 -194
- data/lib/PCP-server-Ruby-SDK/models/apple_payment_data_token_information.rb +8 -229
- data/lib/PCP-server-Ruby-SDK/models/bank_account_information.rb +11 -207
- data/lib/PCP-server-Ruby-SDK/models/bank_payout_method_specific_input.rb +4 -187
- data/lib/PCP-server-Ruby-SDK/models/cancel_item.rb +6 -195
- data/lib/PCP-server-Ruby-SDK/models/cancel_payment_request.rb +6 -222
- data/lib/PCP-server-Ruby-SDK/models/cancel_payment_response.rb +4 -190
- data/lib/PCP-server-Ruby-SDK/models/cancel_request.rb +6 -224
- data/lib/PCP-server-Ruby-SDK/models/cancel_response.rb +4 -190
- data/lib/PCP-server-Ruby-SDK/models/capture_output.rb +9 -214
- data/lib/PCP-server-Ruby-SDK/models/capture_payment_request.rb +14 -253
- data/lib/PCP-server-Ruby-SDK/models/capture_payment_response.rb +7 -239
- data/lib/PCP-server-Ruby-SDK/models/card_fraud_results.rb +29 -184
- data/lib/PCP-server-Ruby-SDK/models/card_info.rb +3 -182
- data/lib/PCP-server-Ruby-SDK/models/card_payment_details.rb +8 -210
- data/lib/PCP-server-Ruby-SDK/models/card_payment_method_specific_input.rb +32 -307
- data/lib/PCP-server-Ruby-SDK/models/card_payment_method_specific_output.rb +6 -210
- data/lib/PCP-server-Ruby-SDK/models/card_recurrence_details.rb +12 -186
- data/lib/PCP-server-Ruby-SDK/models/cart_item_data.rb +10 -0
- data/lib/PCP-server-Ruby-SDK/models/cart_item_input.rb +5 -198
- data/lib/PCP-server-Ruby-SDK/models/cart_item_invoice_data.rb +5 -184
- data/lib/PCP-server-Ruby-SDK/models/cart_item_order_status.rb +4 -213
- data/lib/PCP-server-Ruby-SDK/models/cart_item_patch.rb +5 -200
- data/lib/PCP-server-Ruby-SDK/models/cart_item_result.rb +5 -200
- data/lib/PCP-server-Ruby-SDK/models/cart_item_supplier_references.rb +6 -195
- data/lib/PCP-server-Ruby-SDK/models/checkout_references.rb +4 -192
- data/lib/PCP-server-Ruby-SDK/models/checkout_response.rb +15 -319
- data/lib/PCP-server-Ruby-SDK/models/checkouts_response.rb +4 -193
- data/lib/PCP-server-Ruby-SDK/models/company_information.rb +3 -182
- data/lib/PCP-server-Ruby-SDK/models/complete_financing_payment_method_specific_input.rb +12 -202
- data/lib/PCP-server-Ruby-SDK/models/complete_order_request.rb +3 -181
- data/lib/PCP-server-Ruby-SDK/models/complete_payment_method_specific_input.rb +4 -191
- data/lib/PCP-server-Ruby-SDK/models/complete_payment_product840_specific_input.rb +7 -226
- data/lib/PCP-server-Ruby-SDK/models/complete_payment_request.rb +6 -209
- data/lib/PCP-server-Ruby-SDK/models/complete_payment_response.rb +5 -199
- data/lib/PCP-server-Ruby-SDK/models/complete_redirect_payment_method_specific_input.rb +4 -192
- data/lib/PCP-server-Ruby-SDK/models/contact_details.rb +4 -191
- data/lib/PCP-server-Ruby-SDK/models/create_checkout_request.rb +13 -240
- data/lib/PCP-server-Ruby-SDK/models/create_checkout_response.rb +16 -307
- data/lib/PCP-server-Ruby-SDK/models/create_commerce_case_response.rb +7 -219
- data/lib/PCP-server-Ruby-SDK/models/create_payment_intent.rb +11 -0
- data/lib/PCP-server-Ruby-SDK/models/create_payment_intent_request.rb +13 -0
- data/lib/PCP-server-Ruby-SDK/models/create_payment_intent_response.rb +10 -0
- data/lib/PCP-server-Ruby-SDK/models/create_payment_response.rb +7 -218
- data/lib/PCP-server-Ruby-SDK/models/customer.rb +28 -260
- data/lib/PCP-server-Ruby-SDK/models/customer_account.rb +10 -44
- data/lib/PCP-server-Ruby-SDK/models/customer_device.rb +8 -209
- data/lib/PCP-server-Ruby-SDK/models/deliver_item.rb +6 -195
- data/lib/PCP-server-Ruby-SDK/models/deliver_request.rb +10 -246
- data/lib/PCP-server-Ruby-SDK/models/deliver_response.rb +4 -191
- data/lib/PCP-server-Ruby-SDK/models/delivery_information.rb +3 -185
- data/lib/PCP-server-Ruby-SDK/models/error_response.rb +4 -193
- data/lib/PCP-server-Ruby-SDK/models/financing_payment_method_specific_input.rb +15 -203
- data/lib/PCP-server-Ruby-SDK/models/financing_payment_method_specific_output.rb +10 -196
- data/lib/PCP-server-Ruby-SDK/models/fund_distribution.rb +12 -263
- data/lib/PCP-server-Ruby-SDK/models/fund_split.rb +5 -205
- data/lib/PCP-server-Ruby-SDK/models/fund_split_request.rb +3 -147
- data/lib/PCP-server-Ruby-SDK/models/fund_split_response.rb +10 -174
- data/lib/PCP-server-Ruby-SDK/models/installment_option.rb +13 -273
- data/lib/PCP-server-Ruby-SDK/models/link_information.rb +4 -196
- data/lib/PCP-server-Ruby-SDK/models/merchant_action.rb +16 -194
- data/lib/PCP-server-Ruby-SDK/models/mobile_payment_method_specific_input.rb +13 -246
- data/lib/PCP-server-Ruby-SDK/models/mobile_payment_method_specific_output.rb +7 -219
- data/lib/PCP-server-Ruby-SDK/models/mobile_payment_three_dsecure.rb +3 -179
- data/lib/PCP-server-Ruby-SDK/models/model_base.rb +147 -0
- data/lib/PCP-server-Ruby-SDK/models/order.rb +7 -221
- data/lib/PCP-server-Ruby-SDK/models/order_item.rb +6 -197
- data/lib/PCP-server-Ruby-SDK/models/order_line_details_input.rb +29 -305
- data/lib/PCP-server-Ruby-SDK/models/order_line_details_patch.rb +5 -326
- data/lib/PCP-server-Ruby-SDK/models/order_line_details_result.rb +5 -326
- data/lib/PCP-server-Ruby-SDK/models/order_request.rb +7 -244
- data/lib/PCP-server-Ruby-SDK/models/order_response.rb +4 -192
- data/lib/PCP-server-Ruby-SDK/models/patch_checkout_request.rb +8 -228
- data/lib/PCP-server-Ruby-SDK/models/patch_commerce_case_request.rb +3 -183
- data/lib/PCP-server-Ruby-SDK/models/pause_payment_request.rb +2 -165
- data/lib/PCP-server-Ruby-SDK/models/pause_payment_response.rb +3 -186
- data/lib/PCP-server-Ruby-SDK/models/payee.rb +6 -204
- data/lib/PCP-server-Ruby-SDK/models/payment_creation_output.rb +3 -183
- data/lib/PCP-server-Ruby-SDK/models/payment_event.rb +19 -274
- data/lib/PCP-server-Ruby-SDK/models/payment_execution.rb +29 -335
- data/lib/PCP-server-Ruby-SDK/models/payment_execution_request.rb +4 -191
- data/lib/PCP-server-Ruby-SDK/models/payment_execution_specific_input.rb +6 -212
- data/lib/PCP-server-Ruby-SDK/models/payment_information_refund_request.rb +7 -205
- data/lib/PCP-server-Ruby-SDK/models/payment_information_refund_response.rb +5 -196
- data/lib/PCP-server-Ruby-SDK/models/payment_information_request.rb +10 -249
- data/lib/PCP-server-Ruby-SDK/models/payment_information_response.rb +30 -314
- data/lib/PCP-server-Ruby-SDK/models/payment_instructions.rb +8 -214
- data/lib/PCP-server-Ruby-SDK/models/payment_intent_output.rb +13 -0
- data/lib/PCP-server-Ruby-SDK/models/payment_intent_response.rb +13 -0
- data/lib/PCP-server-Ruby-SDK/models/payment_intent_response_data.rb +12 -0
- data/lib/PCP-server-Ruby-SDK/models/payment_method_specific_input.rb +9 -261
- data/lib/PCP-server-Ruby-SDK/models/payment_method_specific_input_for_intent.rb +9 -0
- data/lib/PCP-server-Ruby-SDK/models/payment_output.rb +11 -255
- data/lib/PCP-server-Ruby-SDK/models/payment_product302_specific_input.rb +11 -225
- data/lib/PCP-server-Ruby-SDK/models/payment_product3391_specific_input.rb +6 -197
- data/lib/PCP-server-Ruby-SDK/models/payment_product3391_specific_output.rb +3 -185
- data/lib/PCP-server-Ruby-SDK/models/payment_product3392_specific_input.rb +3 -185
- data/lib/PCP-server-Ruby-SDK/models/payment_product5002_specific_input.rb +7 -203
- data/lib/PCP-server-Ruby-SDK/models/payment_product771_specific_output.rb +3 -183
- data/lib/PCP-server-Ruby-SDK/models/payment_product840_customer_account.rb +6 -210
- data/lib/PCP-server-Ruby-SDK/models/payment_product840_specific_output.rb +5 -209
- data/lib/PCP-server-Ruby-SDK/models/payment_product840_specific_output_data.rb +11 -0
- data/lib/PCP-server-Ruby-SDK/models/payment_product840_specific_output_for_intent.rb +13 -0
- data/lib/PCP-server-Ruby-SDK/models/payment_references.rb +6 -184
- data/lib/PCP-server-Ruby-SDK/models/payment_references_for_refund.rb +12 -197
- data/lib/PCP-server-Ruby-SDK/models/payment_response.rb +6 -234
- data/lib/PCP-server-Ruby-SDK/models/payment_status_output.rb +6 -234
- data/lib/PCP-server-Ruby-SDK/models/payout_output.rb +5 -205
- data/lib/PCP-server-Ruby-SDK/models/payout_response.rb +6 -215
- data/lib/PCP-server-Ruby-SDK/models/personal_information.rb +11 -227
- data/lib/PCP-server-Ruby-SDK/models/personal_name.rb +5 -201
- data/lib/PCP-server-Ruby-SDK/models/positive_amount_of_money.rb +4 -196
- data/lib/PCP-server-Ruby-SDK/models/processing_mandate_information.rb +9 -254
- data/lib/PCP-server-Ruby-SDK/models/redirect_data.rb +3 -183
- data/lib/PCP-server-Ruby-SDK/models/redirect_payment_method_specific_input.rb +14 -249
- data/lib/PCP-server-Ruby-SDK/models/redirect_payment_method_specific_input_for_intent.rb +12 -0
- data/lib/PCP-server-Ruby-SDK/models/redirect_payment_method_specific_output.rb +6 -211
- data/lib/PCP-server-Ruby-SDK/models/redirect_payment_method_specific_output_for_create_intent.rb +12 -0
- data/lib/PCP-server-Ruby-SDK/models/redirect_payment_method_specific_output_for_intent.rb +10 -0
- data/lib/PCP-server-Ruby-SDK/models/redirect_payment_product840_specific_input.rb +6 -205
- data/lib/PCP-server-Ruby-SDK/models/redirect_payment_product840_specific_input_data.rb +10 -0
- data/lib/PCP-server-Ruby-SDK/models/redirect_payment_product900_specific_input.rb +12 -177
- data/lib/PCP-server-Ruby-SDK/models/redirection_data.rb +11 -186
- data/lib/PCP-server-Ruby-SDK/models/references.rb +47 -205
- data/lib/PCP-server-Ruby-SDK/models/refresh_payment_request.rb +3 -186
- data/lib/PCP-server-Ruby-SDK/models/refund_error_response.rb +4 -193
- data/lib/PCP-server-Ruby-SDK/models/refund_output.rb +8 -211
- data/lib/PCP-server-Ruby-SDK/models/refund_payment_response.rb +7 -242
- data/lib/PCP-server-Ruby-SDK/models/refund_request.rb +6 -210
- data/lib/PCP-server-Ruby-SDK/models/return_information.rb +4 -194
- data/lib/PCP-server-Ruby-SDK/models/return_item.rb +6 -196
- data/lib/PCP-server-Ruby-SDK/models/return_request.rb +6 -234
- data/lib/PCP-server-Ruby-SDK/models/return_response.rb +4 -191
- data/lib/PCP-server-Ruby-SDK/models/sepa_direct_debit_payment_method_specific_input.rb +4 -193
- data/lib/PCP-server-Ruby-SDK/models/sepa_direct_debit_payment_method_specific_output.rb +4 -193
- data/lib/PCP-server-Ruby-SDK/models/sepa_direct_debit_payment_product771_specific_input.rb +4 -192
- data/lib/PCP-server-Ruby-SDK/models/sepa_transfer_payment_product_772_specific_input.rb +3 -186
- data/lib/PCP-server-Ruby-SDK/models/shipping.rb +3 -183
- data/lib/PCP-server-Ruby-SDK/models/shipping_address.rb +14 -0
- data/lib/PCP-server-Ruby-SDK/models/shopping_cart_data.rb +9 -0
- data/lib/PCP-server-Ruby-SDK/models/shopping_cart_input.rb +3 -185
- data/lib/PCP-server-Ruby-SDK/models/shopping_cart_patch.rb +3 -185
- data/lib/PCP-server-Ruby-SDK/models/shopping_cart_result.rb +3 -185
- data/lib/PCP-server-Ruby-SDK/models/status_output.rb +21 -264
- data/lib/PCP-server-Ruby-SDK/models/three_d_secure_results.rb +6 -226
- data/lib/PCP-server-Ruby-SDK/version.rb +1 -1
- data/lib/PCP-server-Ruby-SDK.rb +18 -0
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/scripts/convert_models_to_model_base.rb +128 -0
- data/spec/endpoints/payment_intent_api_client_spec.rb +43 -0
- data/spec/models/api_definition_conformance_spec.rb +88 -0
- data/spec/models/model_base_spec.rb +87 -0
- data/spec/models/payment_intent_models_spec.rb +25 -0
- data/spec/models/required_field_validation_spec.rb +5 -5
- metadata +35 -11
- data/lib/PCP-server-Ruby-SDK/models/action_type.rb +0 -34
- data/lib/PCP-server-Ruby-SDK/models/avs_result.rb +0 -52
- data/lib/PCP-server-Ruby-SDK/models/business_relation.rb +0 -30
|
@@ -1,315 +1,40 @@
|
|
|
1
|
+
require_relative 'model_base'
|
|
1
2
|
|
|
2
|
-
require 'date'
|
|
3
|
-
require 'time'
|
|
4
3
|
module PCPServerSDK
|
|
5
4
|
module Models
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
attr_accessor :recurring
|
|
11
|
-
|
|
5
|
+
class CardPaymentMethodSpecificInput < ModelBase
|
|
6
|
+
attribute :authorization_mode, :authorizationMode, :AuthorizationMode
|
|
7
|
+
attribute :recurring, :recurring, :CardRecurrenceDetails
|
|
12
8
|
# ID of the token to use to create the payment.
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
attribute :payment_processing_token, :paymentProcessingToken, :String
|
|
15
10
|
# Token to identify the card in the reporting.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
#
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
#
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
#
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
#
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
@allowable_values = allowable_values.map do |value|
|
|
44
|
-
case datatype.to_s
|
|
45
|
-
when /Integer/i
|
|
46
|
-
value.to_i
|
|
47
|
-
when /Float/i
|
|
48
|
-
value.to_f
|
|
49
|
-
else
|
|
50
|
-
value
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
def valid?(value)
|
|
56
|
-
!value || allowable_values.include?(value)
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
61
|
-
def self.attribute_map
|
|
62
|
-
{
|
|
63
|
-
:'authorization_mode' => :'authorizationMode',
|
|
64
|
-
:'recurring' => :'recurring',
|
|
65
|
-
:'payment_processing_token' => :'paymentProcessingToken',
|
|
66
|
-
:'reporting_token' => :'reportingToken',
|
|
67
|
-
:'transaction_channel' => :'transactionChannel',
|
|
68
|
-
:'unscheduled_card_on_file_requestor' => :'unscheduledCardOnFileRequestor',
|
|
69
|
-
:'unscheduled_card_on_file_sequence_indicator' => :'unscheduledCardOnFileSequenceIndicator',
|
|
70
|
-
:'payment_product_id' => :'paymentProductId',
|
|
71
|
-
:'card' => :'card',
|
|
72
|
-
:'return_url' => :'returnUrl',
|
|
73
|
-
:'card_on_file_recurring_frequency' => :'cardOnFileRecurringFrequency',
|
|
74
|
-
:'card_on_file_recurring_expiration' => :'cardOnFileRecurringExpiration'
|
|
75
|
-
}
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
# Returns all the JSON keys this model knows about
|
|
79
|
-
def self.acceptable_attributes
|
|
80
|
-
attribute_map.values
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
# Attribute type mapping.
|
|
84
|
-
def self.openapi_types
|
|
85
|
-
{
|
|
86
|
-
:'authorization_mode' => :'AuthorizationMode',
|
|
87
|
-
:'recurring' => :'CardRecurrenceDetails',
|
|
88
|
-
:'payment_processing_token' => :'String',
|
|
89
|
-
:'reporting_token' => :'String',
|
|
90
|
-
:'transaction_channel' => :'TransactionChannel',
|
|
91
|
-
:'unscheduled_card_on_file_requestor' => :'UnscheduledCardOnFileRequestor',
|
|
92
|
-
:'unscheduled_card_on_file_sequence_indicator' => :'UnscheduledCardOnFileSequenceIndicator',
|
|
93
|
-
:'payment_product_id' => :'Integer',
|
|
94
|
-
:'card' => :'CardInfo',
|
|
95
|
-
:'return_url' => :'String',
|
|
96
|
-
:'card_on_file_recurring_frequency' => :'String',
|
|
97
|
-
:'card_on_file_recurring_expiration' => :'String'
|
|
98
|
-
}
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
# List of attributes with nullable: true
|
|
102
|
-
def self.openapi_nullable
|
|
103
|
-
Set.new([
|
|
104
|
-
])
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
# Initializes the object
|
|
108
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
-
def initialize(attributes = {})
|
|
110
|
-
if (!attributes.is_a?(Hash))
|
|
111
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `CardPaymentMethodSpecificInput` initialize method"
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
115
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
116
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
|
117
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `CardPaymentMethodSpecificInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
118
|
-
end
|
|
119
|
-
h[k.to_sym] = v
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
if attributes.key?(:'authorization_mode')
|
|
123
|
-
self.authorization_mode = attributes[:'authorization_mode']
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
if attributes.key?(:'recurring')
|
|
127
|
-
self.recurring = attributes[:'recurring']
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
if attributes.key?(:'payment_processing_token')
|
|
131
|
-
self.payment_processing_token = attributes[:'payment_processing_token']
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
if attributes.key?(:'reporting_token')
|
|
135
|
-
self.reporting_token = attributes[:'reporting_token']
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
if attributes.key?(:'transaction_channel')
|
|
139
|
-
self.transaction_channel = attributes[:'transaction_channel']
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
if attributes.key?(:'unscheduled_card_on_file_requestor')
|
|
143
|
-
self.unscheduled_card_on_file_requestor = attributes[:'unscheduled_card_on_file_requestor']
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
if attributes.key?(:'unscheduled_card_on_file_sequence_indicator')
|
|
147
|
-
self.unscheduled_card_on_file_sequence_indicator = attributes[:'unscheduled_card_on_file_sequence_indicator']
|
|
148
|
-
end
|
|
149
|
-
|
|
150
|
-
if attributes.key?(:'payment_product_id')
|
|
151
|
-
self.payment_product_id = attributes[:'payment_product_id']
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
if attributes.key?(:'card')
|
|
155
|
-
self.card = attributes[:'card']
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
if attributes.key?(:'return_url')
|
|
159
|
-
self.return_url = attributes[:'return_url']
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
if attributes.key?(:'card_on_file_recurring_frequency')
|
|
163
|
-
self.card_on_file_recurring_frequency = attributes[:'card_on_file_recurring_frequency']
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
if attributes.key?(:'card_on_file_recurring_expiration')
|
|
167
|
-
self.card_on_file_recurring_expiration = attributes[:'card_on_file_recurring_expiration']
|
|
168
|
-
end
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
# Checks equality by comparing each attribute.
|
|
172
|
-
# @param [Object] Object to be compared
|
|
173
|
-
def ==(o)
|
|
174
|
-
return true if self.equal?(o)
|
|
175
|
-
self.class == o.class &&
|
|
176
|
-
authorization_mode == o.authorization_mode &&
|
|
177
|
-
recurring == o.recurring &&
|
|
178
|
-
payment_processing_token == o.payment_processing_token &&
|
|
179
|
-
reporting_token == o.reporting_token &&
|
|
180
|
-
transaction_channel == o.transaction_channel &&
|
|
181
|
-
unscheduled_card_on_file_requestor == o.unscheduled_card_on_file_requestor &&
|
|
182
|
-
unscheduled_card_on_file_sequence_indicator == o.unscheduled_card_on_file_sequence_indicator &&
|
|
183
|
-
payment_product_id == o.payment_product_id &&
|
|
184
|
-
card == o.card &&
|
|
185
|
-
return_url == o.return_url &&
|
|
186
|
-
card_on_file_recurring_frequency == o.card_on_file_recurring_frequency &&
|
|
187
|
-
card_on_file_recurring_expiration == o.card_on_file_recurring_expiration
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
# @see the `==` method
|
|
191
|
-
# @param [Object] Object to be compared
|
|
192
|
-
def eql?(o)
|
|
193
|
-
self == o
|
|
194
|
-
end
|
|
195
|
-
|
|
196
|
-
# Calculates hash code according to all attributes.
|
|
197
|
-
# @return [Integer] Hash code
|
|
198
|
-
def hash
|
|
199
|
-
[authorization_mode, recurring, payment_processing_token, reporting_token, transaction_channel, unscheduled_card_on_file_requestor, unscheduled_card_on_file_sequence_indicator, payment_product_id, card, return_url, card_on_file_recurring_frequency, card_on_file_recurring_expiration].hash
|
|
200
|
-
end
|
|
201
|
-
|
|
202
|
-
# Builds the object from hash
|
|
203
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
204
|
-
# @return [Object] Returns the model itself
|
|
205
|
-
def self.build_from_hash(attributes)
|
|
206
|
-
return nil unless attributes.is_a?(Hash)
|
|
207
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
208
|
-
transformed_hash = {}
|
|
209
|
-
openapi_types.each_pair do |key, type|
|
|
210
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
211
|
-
transformed_hash["#{key}"] = nil
|
|
212
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
213
|
-
# check to ensure the input is an array given that the attribute
|
|
214
|
-
# is documented as an array but the input is not
|
|
215
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
216
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
217
|
-
end
|
|
218
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
219
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
220
|
-
end
|
|
221
|
-
end
|
|
222
|
-
new(transformed_hash)
|
|
223
|
-
end
|
|
224
|
-
|
|
225
|
-
# Deserializes the data based on type
|
|
226
|
-
# @param string type Data type
|
|
227
|
-
# @param string value Value to be deserialized
|
|
228
|
-
# @return [Object] Deserialized data
|
|
229
|
-
def self._deserialize(type, value)
|
|
230
|
-
case type.to_sym
|
|
231
|
-
when :Time
|
|
232
|
-
Time.parse(value)
|
|
233
|
-
when :Date
|
|
234
|
-
Date.parse(value)
|
|
235
|
-
when :String
|
|
236
|
-
value.to_s
|
|
237
|
-
when :Integer
|
|
238
|
-
value.to_i
|
|
239
|
-
when :Float
|
|
240
|
-
value.to_f
|
|
241
|
-
when :Boolean
|
|
242
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
243
|
-
true
|
|
244
|
-
else
|
|
245
|
-
false
|
|
246
|
-
end
|
|
247
|
-
when :Object
|
|
248
|
-
# generic object (usually a Hash), return directly
|
|
249
|
-
value
|
|
250
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
251
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
252
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
253
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
254
|
-
k_type = Regexp.last_match[:k_type]
|
|
255
|
-
v_type = Regexp.last_match[:v_type]
|
|
256
|
-
{}.tap do |hash|
|
|
257
|
-
value.each do |k, v|
|
|
258
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
259
|
-
end
|
|
260
|
-
end
|
|
261
|
-
else # model
|
|
262
|
-
# models (e.g. Pet) or oneOf
|
|
263
|
-
klass = PCPServerSDK::Models.const_get(type)
|
|
264
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
265
|
-
end
|
|
266
|
-
end
|
|
267
|
-
|
|
268
|
-
# Returns the string representation of the object
|
|
269
|
-
# @return [String] String presentation of the object
|
|
270
|
-
def to_s
|
|
271
|
-
to_hash.to_s
|
|
272
|
-
end
|
|
273
|
-
|
|
274
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
275
|
-
# @return [Hash] Returns the object in the form of hash
|
|
276
|
-
def to_body
|
|
277
|
-
to_hash
|
|
278
|
-
end
|
|
279
|
-
|
|
280
|
-
# Returns the object in the form of hash
|
|
281
|
-
# @return [Hash] Returns the object in the form of hash
|
|
282
|
-
def to_hash
|
|
283
|
-
hash = {}
|
|
284
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
285
|
-
value = self.send(attr)
|
|
286
|
-
if value.nil?
|
|
287
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
288
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
289
|
-
end
|
|
290
|
-
|
|
291
|
-
hash[param] = _to_hash(value)
|
|
292
|
-
end
|
|
293
|
-
hash
|
|
294
|
-
end
|
|
295
|
-
|
|
296
|
-
# Outputs non-array value in the form of hash
|
|
297
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
298
|
-
# @param [Object] value Any valid value
|
|
299
|
-
# @return [Hash] Returns the value in the form of hash
|
|
300
|
-
def _to_hash(value)
|
|
301
|
-
if value.is_a?(Array)
|
|
302
|
-
value.compact.map { |v| _to_hash(v) }
|
|
303
|
-
elsif value.is_a?(Hash)
|
|
304
|
-
{}.tap do |hash|
|
|
305
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
306
|
-
end
|
|
307
|
-
elsif value.respond_to? :to_hash
|
|
308
|
-
value.to_hash
|
|
309
|
-
else
|
|
310
|
-
value
|
|
311
|
-
end
|
|
312
|
-
end
|
|
11
|
+
attribute :reporting_token, :reportingToken, :String
|
|
12
|
+
attribute :transaction_channel, :transactionChannel, :TransactionChannel
|
|
13
|
+
attribute :unscheduled_card_on_file_requestor, :unscheduledCardOnFileRequestor, :UnscheduledCardOnFileRequestor
|
|
14
|
+
attribute :unscheduled_card_on_file_sequence_indicator, :unscheduledCardOnFileSequenceIndicator, :UnscheduledCardOnFileSequenceIndicator
|
|
15
|
+
attribute :payment_product_id, :paymentProductId, :Integer
|
|
16
|
+
attribute :card, :card, :CardInfo
|
|
17
|
+
# The URL that the customer is redirect to after the payment flow has finished. You can add any number of key
|
|
18
|
+
# value pairs in the query string that, for instance help you to identify the customer when they return to
|
|
19
|
+
# your site. Please note that we will also append some additional key value pairs that will also help you with
|
|
20
|
+
# this identification process.
|
|
21
|
+
# Note: The provided URL should be absolute and contain the protocol to use, e.g. http:// or https://. For use
|
|
22
|
+
# on mobile devices a custom protocol can be used in the form of protocol://. This protocol must be registered
|
|
23
|
+
# on the device first.
|
|
24
|
+
# URLs without a protocol will be rejected.
|
|
25
|
+
attribute :return_url, :returnUrl, :String
|
|
26
|
+
# Period of payment occurrence for recurring and installment payments. Allowed values:
|
|
27
|
+
# * Yearly
|
|
28
|
+
# * Quarterly
|
|
29
|
+
# * Monthly
|
|
30
|
+
#
|
|
31
|
+
# * Weekly
|
|
32
|
+
# * Daily
|
|
33
|
+
# Supported soon
|
|
34
|
+
attribute :card_on_file_recurring_frequency, :cardOnFileRecurringFrequency, :String, enum: ["Yearly", "Quarterly", "Monthly", "Weekly", "Daily"]
|
|
35
|
+
# The end date of the last scheduled payment in a series of transactions.
|
|
36
|
+
# Format YYYYMMDD Supported soon
|
|
37
|
+
attribute :card_on_file_recurring_expiration, :cardOnFileRecurringExpiration, :String
|
|
313
38
|
end
|
|
314
39
|
end
|
|
315
40
|
end
|
|
@@ -1,217 +1,13 @@
|
|
|
1
|
+
require_relative 'model_base'
|
|
1
2
|
|
|
2
|
-
require 'date'
|
|
3
|
-
require 'time'
|
|
4
3
|
module PCPServerSDK
|
|
5
4
|
module Models
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
# Payment product identifier - please check product documentation for a full overview of possible values.
|
|
9
|
-
attr_accessor :payment_product_id
|
|
10
|
-
|
|
5
|
+
class CardPaymentMethodSpecificOutput < ModelBase
|
|
6
|
+
attribute :payment_product_id, :paymentProductId, :Integer
|
|
11
7
|
# Card Authorization code as returned by the acquirer
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
attr_accessor :three_d_secure_results
|
|
17
|
-
|
|
18
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
19
|
-
def self.attribute_map
|
|
20
|
-
{
|
|
21
|
-
:'payment_product_id' => :'paymentProductId',
|
|
22
|
-
:'authorisation_code' => :'authorisationCode',
|
|
23
|
-
:'fraud_results' => :'fraudResults',
|
|
24
|
-
:'three_d_secure_results' => :'threeDSecureResults'
|
|
25
|
-
}
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
# Returns all the JSON keys this model knows about
|
|
29
|
-
def self.acceptable_attributes
|
|
30
|
-
attribute_map.values
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# Attribute type mapping.
|
|
34
|
-
def self.openapi_types
|
|
35
|
-
{
|
|
36
|
-
:'payment_product_id' => :'Integer',
|
|
37
|
-
:'authorisation_code' => :'String',
|
|
38
|
-
:'fraud_results' => :'CardFraudResults',
|
|
39
|
-
:'three_d_secure_results' => :'ThreeDSecureResults'
|
|
40
|
-
}
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
# List of attributes with nullable: true
|
|
44
|
-
def self.openapi_nullable
|
|
45
|
-
Set.new([
|
|
46
|
-
])
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
# Initializes the object
|
|
50
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
51
|
-
def initialize(attributes = {})
|
|
52
|
-
if (!attributes.is_a?(Hash))
|
|
53
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `CardPaymentMethodSpecificOutput` initialize method"
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
57
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
58
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
|
59
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `CardPaymentMethodSpecificOutput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
60
|
-
end
|
|
61
|
-
h[k.to_sym] = v
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
if attributes.key?(:'payment_product_id')
|
|
65
|
-
self.payment_product_id = attributes[:'payment_product_id']
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
if attributes.key?(:'authorisation_code')
|
|
69
|
-
self.authorisation_code = attributes[:'authorisation_code']
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
if attributes.key?(:'fraud_results')
|
|
73
|
-
self.fraud_results = attributes[:'fraud_results']
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
if attributes.key?(:'three_d_secure_results')
|
|
77
|
-
self.three_d_secure_results = attributes[:'three_d_secure_results']
|
|
78
|
-
end
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
# Checks equality by comparing each attribute.
|
|
82
|
-
# @param [Object] Object to be compared
|
|
83
|
-
def ==(o)
|
|
84
|
-
return true if self.equal?(o)
|
|
85
|
-
self.class == o.class &&
|
|
86
|
-
payment_product_id == o.payment_product_id &&
|
|
87
|
-
authorisation_code == o.authorisation_code &&
|
|
88
|
-
fraud_results == o.fraud_results &&
|
|
89
|
-
three_d_secure_results == o.three_d_secure_results
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
# @see the `==` method
|
|
93
|
-
# @param [Object] Object to be compared
|
|
94
|
-
def eql?(o)
|
|
95
|
-
self == o
|
|
96
|
-
end
|
|
97
|
-
|
|
98
|
-
# Calculates hash code according to all attributes.
|
|
99
|
-
# @return [Integer] Hash code
|
|
100
|
-
def hash
|
|
101
|
-
[payment_product_id, authorisation_code, fraud_results, three_d_secure_results].hash
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
# Builds the object from hash
|
|
105
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
106
|
-
# @return [Object] Returns the model itself
|
|
107
|
-
def self.build_from_hash(attributes)
|
|
108
|
-
return nil unless attributes.is_a?(Hash)
|
|
109
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
110
|
-
transformed_hash = {}
|
|
111
|
-
openapi_types.each_pair do |key, type|
|
|
112
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
113
|
-
transformed_hash["#{key}"] = nil
|
|
114
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
115
|
-
# check to ensure the input is an array given that the attribute
|
|
116
|
-
# is documented as an array but the input is not
|
|
117
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
118
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
119
|
-
end
|
|
120
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
121
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
122
|
-
end
|
|
123
|
-
end
|
|
124
|
-
new(transformed_hash)
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
# Deserializes the data based on type
|
|
128
|
-
# @param string type Data type
|
|
129
|
-
# @param string value Value to be deserialized
|
|
130
|
-
# @return [Object] Deserialized data
|
|
131
|
-
def self._deserialize(type, value)
|
|
132
|
-
case type.to_sym
|
|
133
|
-
when :Time
|
|
134
|
-
Time.parse(value)
|
|
135
|
-
when :Date
|
|
136
|
-
Date.parse(value)
|
|
137
|
-
when :String
|
|
138
|
-
value.to_s
|
|
139
|
-
when :Integer
|
|
140
|
-
value.to_i
|
|
141
|
-
when :Float
|
|
142
|
-
value.to_f
|
|
143
|
-
when :Boolean
|
|
144
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
145
|
-
true
|
|
146
|
-
else
|
|
147
|
-
false
|
|
148
|
-
end
|
|
149
|
-
when :Object
|
|
150
|
-
# generic object (usually a Hash), return directly
|
|
151
|
-
value
|
|
152
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
153
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
154
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
155
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
156
|
-
k_type = Regexp.last_match[:k_type]
|
|
157
|
-
v_type = Regexp.last_match[:v_type]
|
|
158
|
-
{}.tap do |hash|
|
|
159
|
-
value.each do |k, v|
|
|
160
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
161
|
-
end
|
|
162
|
-
end
|
|
163
|
-
else # model
|
|
164
|
-
# models (e.g. Pet) or oneOf
|
|
165
|
-
klass = PCPServerSDK::Models.const_get(type)
|
|
166
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
167
|
-
end
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
# Returns the string representation of the object
|
|
171
|
-
# @return [String] String presentation of the object
|
|
172
|
-
def to_s
|
|
173
|
-
to_hash.to_s
|
|
174
|
-
end
|
|
175
|
-
|
|
176
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
177
|
-
# @return [Hash] Returns the object in the form of hash
|
|
178
|
-
def to_body
|
|
179
|
-
to_hash
|
|
180
|
-
end
|
|
181
|
-
|
|
182
|
-
# Returns the object in the form of hash
|
|
183
|
-
# @return [Hash] Returns the object in the form of hash
|
|
184
|
-
def to_hash
|
|
185
|
-
hash = {}
|
|
186
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
187
|
-
value = self.send(attr)
|
|
188
|
-
if value.nil?
|
|
189
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
190
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
191
|
-
end
|
|
192
|
-
|
|
193
|
-
hash[param] = _to_hash(value)
|
|
194
|
-
end
|
|
195
|
-
hash
|
|
196
|
-
end
|
|
197
|
-
|
|
198
|
-
# Outputs non-array value in the form of hash
|
|
199
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
200
|
-
# @param [Object] value Any valid value
|
|
201
|
-
# @return [Hash] Returns the value in the form of hash
|
|
202
|
-
def _to_hash(value)
|
|
203
|
-
if value.is_a?(Array)
|
|
204
|
-
value.compact.map { |v| _to_hash(v) }
|
|
205
|
-
elsif value.is_a?(Hash)
|
|
206
|
-
{}.tap do |hash|
|
|
207
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
208
|
-
end
|
|
209
|
-
elsif value.respond_to? :to_hash
|
|
210
|
-
value.to_hash
|
|
211
|
-
else
|
|
212
|
-
value
|
|
213
|
-
end
|
|
214
|
-
end
|
|
8
|
+
attribute :authorisation_code, :authorisationCode, :String
|
|
9
|
+
attribute :fraud_results, :fraudResults, :CardFraudResults
|
|
10
|
+
attribute :three_d_secure_results, :threeDSecureResults, :ThreeDSecureResults
|
|
215
11
|
end
|
|
216
12
|
end
|
|
217
13
|
end
|