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,209 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
require 'date'
|
|
3
|
-
require 'time'
|
|
1
|
+
require_relative 'model_base'
|
|
4
2
|
|
|
5
3
|
module PCPServerSDK
|
|
6
4
|
module Models
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
#
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# The SRC DPA ID for Click To Pay transactions.
|
|
15
|
-
attr_accessor :src_dpa_id
|
|
16
|
-
|
|
17
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
18
|
-
def self.attribute_map
|
|
19
|
-
{
|
|
20
|
-
:'network' => :'network',
|
|
21
|
-
:'payment_checkout_data' => :'paymentCheckoutData',
|
|
22
|
-
:'src_dpa_id' => :'srcDpaId'
|
|
23
|
-
}
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# Returns all the JSON keys this model knows about
|
|
27
|
-
def self.acceptable_attributes
|
|
28
|
-
attribute_map.values
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# Attribute type mapping.
|
|
32
|
-
def self.openapi_types
|
|
33
|
-
{
|
|
34
|
-
:'network' => :'MobilePaymentNetwork',
|
|
35
|
-
:'payment_checkout_data' => :'String',
|
|
36
|
-
:'src_dpa_id' => :'String'
|
|
37
|
-
}
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
# List of attributes with nullable: true
|
|
41
|
-
def self.openapi_nullable
|
|
42
|
-
Set.new([
|
|
43
|
-
])
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
# Initializes the object
|
|
47
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
48
|
-
def initialize(attributes = {})
|
|
49
|
-
if (!attributes.is_a?(Hash))
|
|
50
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PaymentProduct5002SpecificInput` initialize method"
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
54
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
55
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
|
56
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PaymentProduct5002SpecificInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
57
|
-
end
|
|
58
|
-
h[k.to_sym] = v
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if attributes.key?(:'network')
|
|
62
|
-
self.network = attributes[:'network']
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
if attributes.key?(:'payment_checkout_data')
|
|
66
|
-
self.payment_checkout_data = attributes[:'payment_checkout_data']
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
if attributes.key?(:'src_dpa_id')
|
|
70
|
-
self.src_dpa_id = attributes[:'src_dpa_id']
|
|
71
|
-
end
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
# Checks equality by comparing each attribute.
|
|
75
|
-
# @param [Object] Object to be compared
|
|
76
|
-
def ==(o)
|
|
77
|
-
return true if self.equal?(o)
|
|
78
|
-
self.class == o.class &&
|
|
79
|
-
network == o.network &&
|
|
80
|
-
payment_checkout_data == o.payment_checkout_data &&
|
|
81
|
-
src_dpa_id == o.src_dpa_id
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# @see the `==` method
|
|
85
|
-
# @param [Object] Object to be compared
|
|
86
|
-
def eql?(o)
|
|
87
|
-
self == o
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
# Calculates hash code according to all attributes.
|
|
91
|
-
# @return [Integer] Hash code
|
|
92
|
-
def hash
|
|
93
|
-
[network, payment_checkout_data, src_dpa_id].hash
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
# Builds the object from hash
|
|
97
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
98
|
-
# @return [Object] Returns the model itself
|
|
99
|
-
def self.build_from_hash(attributes)
|
|
100
|
-
return nil unless attributes.is_a?(Hash)
|
|
101
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
102
|
-
transformed_hash = {}
|
|
103
|
-
openapi_types.each_pair do |key, type|
|
|
104
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
105
|
-
transformed_hash["#{key}"] = nil
|
|
106
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
107
|
-
# check to ensure the input is an array given that the attribute
|
|
108
|
-
# is documented as an array but the input is not
|
|
109
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
110
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
111
|
-
end
|
|
112
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
113
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
114
|
-
end
|
|
115
|
-
end
|
|
116
|
-
new(transformed_hash)
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
# Deserializes the data based on type
|
|
120
|
-
# @param string type Data type
|
|
121
|
-
# @param string value Value to be deserialized
|
|
122
|
-
# @return [Object] Deserialized data
|
|
123
|
-
def self._deserialize(type, value)
|
|
124
|
-
case type.to_sym
|
|
125
|
-
when :Time
|
|
126
|
-
Time.parse(value)
|
|
127
|
-
when :Date
|
|
128
|
-
Date.parse(value)
|
|
129
|
-
when :String
|
|
130
|
-
value.to_s
|
|
131
|
-
when :Integer
|
|
132
|
-
value.to_i
|
|
133
|
-
when :Float
|
|
134
|
-
value.to_f
|
|
135
|
-
when :Boolean
|
|
136
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
137
|
-
true
|
|
138
|
-
else
|
|
139
|
-
false
|
|
140
|
-
end
|
|
141
|
-
when :Object
|
|
142
|
-
# generic object (usually a Hash), return directly
|
|
143
|
-
value
|
|
144
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
145
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
146
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
147
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
148
|
-
k_type = Regexp.last_match[:k_type]
|
|
149
|
-
v_type = Regexp.last_match[:v_type]
|
|
150
|
-
{}.tap do |hash|
|
|
151
|
-
value.each do |k, v|
|
|
152
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
153
|
-
end
|
|
154
|
-
end
|
|
155
|
-
else # model
|
|
156
|
-
# models (e.g. Pet) or oneOf
|
|
157
|
-
klass = PCPServerSDK::Models.const_get(type)
|
|
158
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
159
|
-
end
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
# Returns the string representation of the object
|
|
163
|
-
# @return [String] String presentation of the object
|
|
164
|
-
def to_s
|
|
165
|
-
to_hash.to_s
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
169
|
-
# @return [Hash] Returns the object in the form of hash
|
|
170
|
-
def to_body
|
|
171
|
-
to_hash
|
|
172
|
-
end
|
|
173
|
-
|
|
174
|
-
# Returns the object in the form of hash
|
|
175
|
-
# @return [Hash] Returns the object in the form of hash
|
|
176
|
-
def to_hash
|
|
177
|
-
hash = {}
|
|
178
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
179
|
-
value = self.send(attr)
|
|
180
|
-
if value.nil?
|
|
181
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
182
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
183
|
-
end
|
|
184
|
-
|
|
185
|
-
hash[param] = _to_hash(value)
|
|
186
|
-
end
|
|
187
|
-
hash
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
# Outputs non-array value in the form of hash
|
|
191
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
192
|
-
# @param [Object] value Any valid value
|
|
193
|
-
# @return [Hash] Returns the value in the form of hash
|
|
194
|
-
def _to_hash(value)
|
|
195
|
-
if value.is_a?(Array)
|
|
196
|
-
value.compact.map { |v| _to_hash(v) }
|
|
197
|
-
elsif value.is_a?(Hash)
|
|
198
|
-
{}.tap do |hash|
|
|
199
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
200
|
-
end
|
|
201
|
-
elsif value.respond_to? :to_hash
|
|
202
|
-
value.to_hash
|
|
203
|
-
else
|
|
204
|
-
value
|
|
205
|
-
end
|
|
206
|
-
end
|
|
5
|
+
class PaymentProduct5002SpecificInput < ModelBase
|
|
6
|
+
attribute :network, :network, :MobilePaymentNetwork
|
|
7
|
+
# JWS Token Value (checkoutResponseSignature) as received in the Checkout Response on Client Side, Base64URL encoded.
|
|
8
|
+
attribute :payment_checkout_data, :paymentCheckoutData, :String
|
|
9
|
+
# DPA Identifier provided by PAYONE during client side initialization for the corresponding card type selected by the end consumer in the Click to Pay flow.
|
|
10
|
+
attribute :src_dpa_id, :srcDpaId, :String
|
|
207
11
|
end
|
|
208
12
|
end
|
|
209
13
|
end
|
|
@@ -1,190 +1,10 @@
|
|
|
1
|
+
require_relative 'model_base'
|
|
1
2
|
|
|
2
|
-
require 'date'
|
|
3
|
-
require 'time'
|
|
4
|
-
|
|
5
|
-
# Output that is SEPA Direct Debit specific (i.e. the used mandate).
|
|
6
3
|
module PCPServerSDK
|
|
7
4
|
module Models
|
|
8
|
-
class PaymentProduct771SpecificOutput
|
|
5
|
+
class PaymentProduct771SpecificOutput < ModelBase
|
|
9
6
|
# Unique reference fo a SEPA Mandate
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
13
|
-
def self.attribute_map
|
|
14
|
-
{
|
|
15
|
-
:'mandate_reference' => :'mandateReference'
|
|
16
|
-
}
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
# Returns all the JSON keys this model knows about
|
|
20
|
-
def self.acceptable_attributes
|
|
21
|
-
attribute_map.values
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
# Attribute type mapping.
|
|
25
|
-
def self.openapi_types
|
|
26
|
-
{
|
|
27
|
-
:'mandate_reference' => :'String'
|
|
28
|
-
}
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# List of attributes with nullable: true
|
|
32
|
-
def self.openapi_nullable
|
|
33
|
-
Set.new([
|
|
34
|
-
])
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
# Initializes the object
|
|
38
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
39
|
-
def initialize(attributes = {})
|
|
40
|
-
if (!attributes.is_a?(Hash))
|
|
41
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PaymentProduct771SpecificOutput` initialize method"
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
45
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
46
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
|
47
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PaymentProduct771SpecificOutput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
48
|
-
end
|
|
49
|
-
h[k.to_sym] = v
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if attributes.key?(:'mandate_reference')
|
|
53
|
-
self.mandate_reference = attributes[:'mandate_reference']
|
|
54
|
-
end
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
# Checks equality by comparing each attribute.
|
|
58
|
-
# @param [Object] Object to be compared
|
|
59
|
-
def ==(o)
|
|
60
|
-
return true if self.equal?(o)
|
|
61
|
-
self.class == o.class &&
|
|
62
|
-
mandate_reference == o.mandate_reference
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
# @see the `==` method
|
|
66
|
-
# @param [Object] Object to be compared
|
|
67
|
-
def eql?(o)
|
|
68
|
-
self == o
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
# Calculates hash code according to all attributes.
|
|
72
|
-
# @return [Integer] Hash code
|
|
73
|
-
def hash
|
|
74
|
-
[mandate_reference].hash
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
# Builds the object from hash
|
|
78
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
79
|
-
# @return [Object] Returns the model itself
|
|
80
|
-
def self.build_from_hash(attributes)
|
|
81
|
-
return nil unless attributes.is_a?(Hash)
|
|
82
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
83
|
-
transformed_hash = {}
|
|
84
|
-
openapi_types.each_pair do |key, type|
|
|
85
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
86
|
-
transformed_hash["#{key}"] = nil
|
|
87
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
88
|
-
# check to ensure the input is an array given that the attribute
|
|
89
|
-
# is documented as an array but the input is not
|
|
90
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
91
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
92
|
-
end
|
|
93
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
94
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
95
|
-
end
|
|
96
|
-
end
|
|
97
|
-
new(transformed_hash)
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
# Deserializes the data based on type
|
|
101
|
-
# @param string type Data type
|
|
102
|
-
# @param string value Value to be deserialized
|
|
103
|
-
# @return [Object] Deserialized data
|
|
104
|
-
def self._deserialize(type, value)
|
|
105
|
-
case type.to_sym
|
|
106
|
-
when :Time
|
|
107
|
-
Time.parse(value)
|
|
108
|
-
when :Date
|
|
109
|
-
Date.parse(value)
|
|
110
|
-
when :String
|
|
111
|
-
value.to_s
|
|
112
|
-
when :Integer
|
|
113
|
-
value.to_i
|
|
114
|
-
when :Float
|
|
115
|
-
value.to_f
|
|
116
|
-
when :Boolean
|
|
117
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
118
|
-
true
|
|
119
|
-
else
|
|
120
|
-
false
|
|
121
|
-
end
|
|
122
|
-
when :Object
|
|
123
|
-
# generic object (usually a Hash), return directly
|
|
124
|
-
value
|
|
125
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
126
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
127
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
128
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
129
|
-
k_type = Regexp.last_match[:k_type]
|
|
130
|
-
v_type = Regexp.last_match[:v_type]
|
|
131
|
-
{}.tap do |hash|
|
|
132
|
-
value.each do |k, v|
|
|
133
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
134
|
-
end
|
|
135
|
-
end
|
|
136
|
-
else # model
|
|
137
|
-
# models (e.g. Pet) or oneOf
|
|
138
|
-
klass = PCPServerSDK::Models.const_get(type)
|
|
139
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
140
|
-
end
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
# Returns the string representation of the object
|
|
144
|
-
# @return [String] String presentation of the object
|
|
145
|
-
def to_s
|
|
146
|
-
to_hash.to_s
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
150
|
-
# @return [Hash] Returns the object in the form of hash
|
|
151
|
-
def to_body
|
|
152
|
-
to_hash
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
# Returns the object in the form of hash
|
|
156
|
-
# @return [Hash] Returns the object in the form of hash
|
|
157
|
-
def to_hash
|
|
158
|
-
hash = {}
|
|
159
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
160
|
-
value = self.send(attr)
|
|
161
|
-
if value.nil?
|
|
162
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
163
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
hash[param] = _to_hash(value)
|
|
167
|
-
end
|
|
168
|
-
hash
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
# Outputs non-array value in the form of hash
|
|
172
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
173
|
-
# @param [Object] value Any valid value
|
|
174
|
-
# @return [Hash] Returns the value in the form of hash
|
|
175
|
-
def _to_hash(value)
|
|
176
|
-
if value.is_a?(Array)
|
|
177
|
-
value.compact.map { |v| _to_hash(v) }
|
|
178
|
-
elsif value.is_a?(Hash)
|
|
179
|
-
{}.tap do |hash|
|
|
180
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
181
|
-
end
|
|
182
|
-
elsif value.respond_to? :to_hash
|
|
183
|
-
value.to_hash
|
|
184
|
-
else
|
|
185
|
-
value
|
|
186
|
-
end
|
|
187
|
-
end
|
|
7
|
+
attribute :mandate_reference, :mandateReference, :String
|
|
188
8
|
end
|
|
189
9
|
end
|
|
190
10
|
end
|
|
@@ -1,220 +1,16 @@
|
|
|
1
|
+
require_relative 'model_base'
|
|
1
2
|
|
|
2
|
-
require 'date'
|
|
3
|
-
require 'time'
|
|
4
|
-
|
|
5
|
-
# Object containing the details of the PayPal account.
|
|
6
3
|
module PCPServerSDK
|
|
7
4
|
module Models
|
|
8
|
-
class PaymentProduct840CustomerAccount
|
|
5
|
+
class PaymentProduct840CustomerAccount < ModelBase
|
|
9
6
|
# Name of the company in case the PayPal account is owned by a business
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
attribute :company_name, :companyName, :String
|
|
12
8
|
# First name of the PayPal account holder
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
attribute :first_name, :firstName, :String
|
|
15
10
|
# The unique identifier of a PayPal account and will never change in the life cycle of a PayPal account.
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
attribute :payer_id, :payerId, :String
|
|
18
12
|
# Surname of the PayPal account holder
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
-
def self.attribute_map
|
|
23
|
-
{
|
|
24
|
-
:'company_name' => :'companyName',
|
|
25
|
-
:'first_name' => :'firstName',
|
|
26
|
-
:'payer_id' => :'payerId',
|
|
27
|
-
:'surname' => :'surname'
|
|
28
|
-
}
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# Returns all the JSON keys this model knows about
|
|
32
|
-
def self.acceptable_attributes
|
|
33
|
-
attribute_map.values
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
# Attribute type mapping.
|
|
37
|
-
def self.openapi_types
|
|
38
|
-
{
|
|
39
|
-
:'company_name' => :'String',
|
|
40
|
-
:'first_name' => :'String',
|
|
41
|
-
:'payer_id' => :'String',
|
|
42
|
-
:'surname' => :'String'
|
|
43
|
-
}
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
# List of attributes with nullable: true
|
|
47
|
-
def self.openapi_nullable
|
|
48
|
-
Set.new([
|
|
49
|
-
])
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
# Initializes the object
|
|
53
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
54
|
-
def initialize(attributes = {})
|
|
55
|
-
if (!attributes.is_a?(Hash))
|
|
56
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PaymentProduct840CustomerAccount` initialize method"
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
60
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
|
62
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PaymentProduct840CustomerAccount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
63
|
-
end
|
|
64
|
-
h[k.to_sym] = v
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if attributes.key?(:'company_name')
|
|
68
|
-
self.company_name = attributes[:'company_name']
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
if attributes.key?(:'first_name')
|
|
72
|
-
self.first_name = attributes[:'first_name']
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
if attributes.key?(:'payer_id')
|
|
76
|
-
self.payer_id = attributes[:'payer_id']
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
if attributes.key?(:'surname')
|
|
80
|
-
self.surname = attributes[:'surname']
|
|
81
|
-
end
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# Checks equality by comparing each attribute.
|
|
85
|
-
# @param [Object] Object to be compared
|
|
86
|
-
def ==(o)
|
|
87
|
-
return true if self.equal?(o)
|
|
88
|
-
self.class == o.class &&
|
|
89
|
-
company_name == o.company_name &&
|
|
90
|
-
first_name == o.first_name &&
|
|
91
|
-
payer_id == o.payer_id &&
|
|
92
|
-
surname == o.surname
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
# @see the `==` method
|
|
96
|
-
# @param [Object] Object to be compared
|
|
97
|
-
def eql?(o)
|
|
98
|
-
self == o
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
# Calculates hash code according to all attributes.
|
|
102
|
-
# @return [Integer] Hash code
|
|
103
|
-
def hash
|
|
104
|
-
[company_name, first_name, payer_id, surname].hash
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
# Builds the object from hash
|
|
108
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
-
# @return [Object] Returns the model itself
|
|
110
|
-
def self.build_from_hash(attributes)
|
|
111
|
-
return nil unless attributes.is_a?(Hash)
|
|
112
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
113
|
-
transformed_hash = {}
|
|
114
|
-
openapi_types.each_pair do |key, type|
|
|
115
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
116
|
-
transformed_hash["#{key}"] = nil
|
|
117
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
118
|
-
# check to ensure the input is an array given that the attribute
|
|
119
|
-
# is documented as an array but the input is not
|
|
120
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
121
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
122
|
-
end
|
|
123
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
124
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
125
|
-
end
|
|
126
|
-
end
|
|
127
|
-
new(transformed_hash)
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
# Deserializes the data based on type
|
|
131
|
-
# @param string type Data type
|
|
132
|
-
# @param string value Value to be deserialized
|
|
133
|
-
# @return [Object] Deserialized data
|
|
134
|
-
def self._deserialize(type, value)
|
|
135
|
-
case type.to_sym
|
|
136
|
-
when :Time
|
|
137
|
-
Time.parse(value)
|
|
138
|
-
when :Date
|
|
139
|
-
Date.parse(value)
|
|
140
|
-
when :String
|
|
141
|
-
value.to_s
|
|
142
|
-
when :Integer
|
|
143
|
-
value.to_i
|
|
144
|
-
when :Float
|
|
145
|
-
value.to_f
|
|
146
|
-
when :Boolean
|
|
147
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
148
|
-
true
|
|
149
|
-
else
|
|
150
|
-
false
|
|
151
|
-
end
|
|
152
|
-
when :Object
|
|
153
|
-
# generic object (usually a Hash), return directly
|
|
154
|
-
value
|
|
155
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
156
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
157
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
158
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
159
|
-
k_type = Regexp.last_match[:k_type]
|
|
160
|
-
v_type = Regexp.last_match[:v_type]
|
|
161
|
-
{}.tap do |hash|
|
|
162
|
-
value.each do |k, v|
|
|
163
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
164
|
-
end
|
|
165
|
-
end
|
|
166
|
-
else # model
|
|
167
|
-
# models (e.g. Pet) or oneOf
|
|
168
|
-
klass = PCPServerSDK::Models.const_get(type)
|
|
169
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
170
|
-
end
|
|
171
|
-
end
|
|
172
|
-
|
|
173
|
-
# Returns the string representation of the object
|
|
174
|
-
# @return [String] String presentation of the object
|
|
175
|
-
def to_s
|
|
176
|
-
to_hash.to_s
|
|
177
|
-
end
|
|
178
|
-
|
|
179
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
180
|
-
# @return [Hash] Returns the object in the form of hash
|
|
181
|
-
def to_body
|
|
182
|
-
to_hash
|
|
183
|
-
end
|
|
184
|
-
|
|
185
|
-
# Returns the object in the form of hash
|
|
186
|
-
# @return [Hash] Returns the object in the form of hash
|
|
187
|
-
def to_hash
|
|
188
|
-
hash = {}
|
|
189
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
190
|
-
value = self.send(attr)
|
|
191
|
-
if value.nil?
|
|
192
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
193
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
194
|
-
end
|
|
195
|
-
|
|
196
|
-
hash[param] = _to_hash(value)
|
|
197
|
-
end
|
|
198
|
-
hash
|
|
199
|
-
end
|
|
200
|
-
|
|
201
|
-
# Outputs non-array value in the form of hash
|
|
202
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
203
|
-
# @param [Object] value Any valid value
|
|
204
|
-
# @return [Hash] Returns the value in the form of hash
|
|
205
|
-
def _to_hash(value)
|
|
206
|
-
if value.is_a?(Array)
|
|
207
|
-
value.compact.map { |v| _to_hash(v) }
|
|
208
|
-
elsif value.is_a?(Hash)
|
|
209
|
-
{}.tap do |hash|
|
|
210
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
211
|
-
end
|
|
212
|
-
elsif value.respond_to? :to_hash
|
|
213
|
-
value.to_hash
|
|
214
|
-
else
|
|
215
|
-
value
|
|
216
|
-
end
|
|
217
|
-
end
|
|
13
|
+
attribute :surname, :surname, :String
|
|
218
14
|
end
|
|
219
15
|
end
|
|
220
16
|
end
|