mundi_api 0.9.1 → 0.13.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1755 -698
- data/lib/mundi_api.rb +75 -35
- data/lib/mundi_api/api_helper.rb +59 -7
- data/lib/mundi_api/controllers/charges_controller.rb +136 -97
- data/lib/mundi_api/controllers/customers_controller.rb +264 -253
- data/lib/mundi_api/controllers/invoices_controller.rb +97 -23
- data/lib/mundi_api/controllers/orders_controller.rb +247 -30
- data/lib/mundi_api/controllers/plans_controller.rb +108 -106
- data/lib/mundi_api/controllers/recipients_controller.rb +571 -0
- data/lib/mundi_api/controllers/sellers_controller.rb +244 -0
- data/lib/mundi_api/controllers/subscriptions_controller.rb +298 -108
- data/lib/mundi_api/models/create_access_token_request.rb +7 -9
- data/lib/mundi_api/models/create_address_request.rb +30 -14
- data/lib/mundi_api/models/create_anticipation_request.rb +53 -0
- data/lib/mundi_api/models/create_bank_account_request.rb +114 -0
- data/lib/mundi_api/models/create_bank_transfer_payment_request.rb +3 -5
- data/lib/mundi_api/models/create_boleto_payment_request.rb +18 -11
- data/lib/mundi_api/models/create_cancel_charge_request.rb +2 -4
- data/lib/mundi_api/models/create_cancel_subscription_request.rb +2 -4
- data/lib/mundi_api/models/create_capture_charge_request.rb +3 -5
- data/lib/mundi_api/models/create_card_options_request.rb +2 -4
- data/lib/mundi_api/models/create_card_request.rb +24 -17
- data/lib/mundi_api/models/create_card_token_request.rb +7 -9
- data/lib/mundi_api/models/create_charge_request.rb +8 -10
- data/lib/mundi_api/models/create_checkout_boleto_payment_request.rb +4 -6
- data/lib/mundi_api/models/create_checkout_card_installment_option_request.rb +3 -5
- data/lib/mundi_api/models/create_checkout_card_payment_request.rb +3 -5
- data/lib/mundi_api/models/create_checkout_payment_request.rb +55 -11
- data/lib/mundi_api/models/create_credit_card_payment_request.rb +28 -12
- data/lib/mundi_api/models/create_customer_request.rb +10 -12
- data/lib/mundi_api/models/create_device_request.rb +33 -0
- data/lib/mundi_api/models/create_discount_request.rb +5 -7
- data/lib/mundi_api/models/create_location_request.rb +42 -0
- data/lib/mundi_api/models/create_order_item_request.rb +15 -8
- data/lib/mundi_api/models/create_order_request.rb +57 -13
- data/lib/mundi_api/models/create_payment_request.rb +46 -13
- data/lib/mundi_api/models/create_phone_request.rb +4 -6
- data/lib/mundi_api/models/create_phones_request.rb +3 -5
- data/lib/mundi_api/models/create_plan_item_request.rb +7 -9
- data/lib/mundi_api/models/create_plan_request.rb +19 -21
- data/lib/mundi_api/models/create_price_bracket_request.rb +5 -7
- data/lib/mundi_api/models/create_pricing_scheme_request.rb +5 -7
- data/lib/mundi_api/models/create_recipient_request.rb +88 -0
- data/lib/mundi_api/models/create_seller_request.rb +21 -23
- data/lib/mundi_api/models/create_setup_request.rb +4 -6
- data/lib/mundi_api/models/create_shipping_request.rb +7 -9
- data/lib/mundi_api/models/create_split_request.rb +51 -0
- data/lib/mundi_api/models/create_subscription_item_request.rb +18 -11
- data/lib/mundi_api/models/create_subscription_request.rb +46 -30
- data/lib/mundi_api/models/create_token_request.rb +3 -5
- data/lib/mundi_api/models/create_transfer_request.rb +42 -0
- data/lib/mundi_api/models/create_usage_request.rb +4 -6
- data/lib/mundi_api/models/create_voucher_payment_request.rb +6 -8
- data/lib/mundi_api/models/get_access_token_response.rb +6 -8
- data/lib/mundi_api/models/get_address_response.rb +35 -19
- data/lib/mundi_api/models/get_anticipation_limit_response.rb +42 -0
- data/lib/mundi_api/models/get_anticipation_limits_response.rb +42 -0
- data/lib/mundi_api/models/get_anticipation_response.rb +117 -0
- data/lib/mundi_api/models/get_balance_response.rb +52 -0
- data/lib/mundi_api/models/get_bank_account_response.rb +161 -0
- data/lib/mundi_api/models/get_bank_transfer_transaction_response.rb +22 -9
- data/lib/mundi_api/models/get_billing_address_response.rb +29 -13
- data/lib/mundi_api/models/get_boleto_transaction_response.rb +96 -11
- data/lib/mundi_api/models/get_card_response.rb +16 -18
- data/lib/mundi_api/models/get_card_token_response.rb +8 -10
- data/lib/mundi_api/models/get_charge_response.rb +18 -20
- data/lib/mundi_api/models/get_checkout_boleto_payment_response.rb +43 -0
- data/lib/mundi_api/models/get_checkout_card_installment_options_response.rb +42 -0
- data/lib/mundi_api/models/get_checkout_card_payment_response.rb +49 -0
- data/lib/mundi_api/models/get_checkout_payment_response.rb +238 -0
- data/lib/mundi_api/models/get_checkout_payment_settings_response.rb +9 -11
- data/lib/mundi_api/models/get_credit_card_transaction_response.rb +36 -14
- data/lib/mundi_api/models/get_customer_response.rb +24 -17
- data/lib/mundi_api/models/get_device_response.rb +33 -0
- data/lib/mundi_api/models/get_discount_response.rb +9 -11
- data/lib/mundi_api/models/get_gateway_recipient_response.rb +69 -0
- data/lib/mundi_api/models/get_invoice_item_response.rb +27 -11
- data/lib/mundi_api/models/get_invoice_response.rb +29 -22
- data/lib/mundi_api/models/get_location_response.rb +42 -0
- data/lib/mundi_api/models/get_order_item_response.rb +28 -12
- data/lib/mundi_api/models/get_order_response.rb +64 -20
- data/lib/mundi_api/models/get_period_response.rb +6 -8
- data/lib/mundi_api/models/get_phone_response.rb +4 -6
- data/lib/mundi_api/models/get_phones_response.rb +3 -5
- data/lib/mundi_api/models/get_plan_item_response.rb +12 -14
- data/lib/mundi_api/models/get_plan_response.rb +22 -24
- data/lib/mundi_api/models/get_price_bracket_response.rb +5 -7
- data/lib/mundi_api/models/get_pricing_scheme_response.rb +5 -7
- data/lib/mundi_api/models/get_recipient_response.rb +150 -0
- data/lib/mundi_api/models/get_safety_pay_transaction_response.rb +21 -8
- data/lib/mundi_api/models/get_seller_response.rb +13 -15
- data/lib/mundi_api/models/get_sellers_request.rb +87 -0
- data/lib/mundi_api/models/get_setup_response.rb +5 -7
- data/lib/mundi_api/models/get_shipping_response.rb +6 -8
- data/lib/mundi_api/models/get_split_response.rb +52 -0
- data/lib/mundi_api/models/get_subscription_item_response.rb +24 -17
- data/lib/mundi_api/models/get_subscription_response.rb +44 -37
- data/lib/mundi_api/models/get_token_response.rb +6 -8
- data/lib/mundi_api/models/get_transaction_response.rb +37 -14
- data/lib/mundi_api/models/get_transfer_response.rb +89 -0
- data/lib/mundi_api/models/get_usage_response.rb +27 -11
- data/lib/mundi_api/models/get_voucher_transaction_response.rb +27 -14
- data/lib/mundi_api/models/list_access_tokens_response.rb +3 -5
- data/lib/mundi_api/models/list_addresses_response.rb +3 -5
- data/lib/mundi_api/models/list_anticipation_response.rb +49 -0
- data/lib/mundi_api/models/list_cards_response.rb +3 -5
- data/lib/mundi_api/models/list_charges_response.rb +3 -5
- data/lib/mundi_api/models/list_customers_response.rb +3 -5
- data/lib/mundi_api/models/list_invoices_response.rb +3 -5
- data/lib/mundi_api/models/list_order_response.rb +3 -5
- data/lib/mundi_api/models/list_plans_response.rb +3 -5
- data/lib/mundi_api/models/list_recipient_response.rb +49 -0
- data/lib/mundi_api/models/list_seller_response.rb +49 -0
- data/lib/mundi_api/models/list_subscription_items_response.rb +3 -5
- data/lib/mundi_api/models/list_subscriptions_response.rb +3 -5
- data/lib/mundi_api/models/list_transactions_response.rb +3 -5
- data/lib/mundi_api/models/list_transfer_response.rb +49 -0
- data/lib/mundi_api/models/list_usages_response.rb +3 -5
- data/lib/mundi_api/models/paging_response.rb +4 -6
- data/lib/mundi_api/models/update_address_request.rb +15 -8
- data/lib/mundi_api/models/update_card_request.rb +7 -9
- data/lib/mundi_api/models/update_charge_card_request.rb +5 -7
- data/lib/mundi_api/models/update_charge_due_date_request.rb +2 -4
- data/lib/mundi_api/models/update_charge_payment_method_request.rb +6 -8
- data/lib/mundi_api/models/update_customer_request.rb +23 -16
- data/lib/mundi_api/models/update_invoice_status_request.rb +33 -0
- data/lib/mundi_api/models/update_metadata_request.rb +2 -4
- data/lib/mundi_api/models/update_order_item_request.rb +60 -0
- data/lib/mundi_api/models/update_order_status_request.rb +33 -0
- data/lib/mundi_api/models/update_plan_item_request.rb +7 -9
- data/lib/mundi_api/models/update_plan_request.rb +16 -18
- data/lib/mundi_api/models/update_price_bracket_request.rb +5 -7
- data/lib/mundi_api/models/update_pricing_scheme_request.rb +5 -7
- data/lib/mundi_api/models/update_recipient_bank_account_request.rb +34 -0
- data/lib/mundi_api/models/update_recipient_request.rb +78 -0
- data/lib/mundi_api/models/update_seller_request.rb +97 -0
- data/lib/mundi_api/models/update_subscription_affiliation_id_request.rb +33 -0
- data/lib/mundi_api/models/update_subscription_billing_date_request.rb +2 -4
- data/lib/mundi_api/models/update_subscription_card_request.rb +3 -5
- data/lib/mundi_api/models/update_subscription_item_request.rb +16 -9
- data/lib/mundi_api/models/update_subscription_payment_method_request.rb +4 -6
- data/lib/mundi_api/mundi_api_client.rb +32 -20
- metadata +39 -3
@@ -0,0 +1,238 @@
|
|
1
|
+
# This file was automatically generated by APIMATIC v2.0
|
2
|
+
# ( https://apimatic.io ).
|
3
|
+
|
4
|
+
require 'date'
|
5
|
+
module MundiApi
|
6
|
+
# Resposta das configurações de pagamento do checkout
|
7
|
+
class GetCheckoutPaymentResponse < BaseModel
|
8
|
+
# TODO: Write general description for this method
|
9
|
+
# @return [String]
|
10
|
+
attr_accessor :id
|
11
|
+
|
12
|
+
# Meio de pagamento padrão no checkout
|
13
|
+
# @return [String]
|
14
|
+
attr_accessor :default_payment_method
|
15
|
+
|
16
|
+
# Url de redirecionamento de sucesso após o checkou
|
17
|
+
# @return [String]
|
18
|
+
attr_accessor :success_url
|
19
|
+
|
20
|
+
# Url para pagamento usando o checkout
|
21
|
+
# @return [String]
|
22
|
+
attr_accessor :payment_url
|
23
|
+
|
24
|
+
# Código da afiliação onde o pagamento será processado no gateway
|
25
|
+
# @return [String]
|
26
|
+
attr_accessor :gateway_affiliation_id
|
27
|
+
|
28
|
+
# Meios de pagamento aceitos no checkout
|
29
|
+
# @return [List of String]
|
30
|
+
attr_accessor :accepted_payment_methods
|
31
|
+
|
32
|
+
# Status do checkout
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :status
|
35
|
+
|
36
|
+
# Pular tela de sucesso pós-pagamento?
|
37
|
+
# @return [Boolean]
|
38
|
+
attr_accessor :skip_checkout_success_page
|
39
|
+
|
40
|
+
# Data de criação
|
41
|
+
# @return [DateTime]
|
42
|
+
attr_accessor :created_at
|
43
|
+
|
44
|
+
# Data de atualização
|
45
|
+
# @return [DateTime]
|
46
|
+
attr_accessor :updated_at
|
47
|
+
|
48
|
+
# Torna o objeto customer editável
|
49
|
+
# @return [Boolean]
|
50
|
+
attr_accessor :customer_editable
|
51
|
+
|
52
|
+
# Dados do comprador
|
53
|
+
# @return [GetCustomerResponse]
|
54
|
+
attr_accessor :customer
|
55
|
+
|
56
|
+
# Dados do endereço de cobrança
|
57
|
+
# @return [GetAddressResponse]
|
58
|
+
attr_accessor :billingaddress
|
59
|
+
|
60
|
+
# Configurações de cartão de crédito
|
61
|
+
# @return [GetCheckoutCardPaymentResponse]
|
62
|
+
attr_accessor :credit_card
|
63
|
+
|
64
|
+
# Configurações de boleto
|
65
|
+
# @return [GetCheckoutBoletoPaymentResponse]
|
66
|
+
attr_accessor :boleto
|
67
|
+
|
68
|
+
# Indica se o billing address poderá ser editado
|
69
|
+
# @return [Boolean]
|
70
|
+
attr_accessor :billing_address_editable
|
71
|
+
|
72
|
+
# Configurações de entrega
|
73
|
+
# @return [GetShippingResponse]
|
74
|
+
attr_accessor :shipping
|
75
|
+
|
76
|
+
# Indica se possui entrega
|
77
|
+
# @return [Boolean]
|
78
|
+
attr_accessor :shippable
|
79
|
+
|
80
|
+
# Moeda
|
81
|
+
# @return [String]
|
82
|
+
attr_accessor :currency
|
83
|
+
|
84
|
+
# Valor em centavos
|
85
|
+
# @return [Integer]
|
86
|
+
attr_accessor :amount
|
87
|
+
|
88
|
+
# Data de cancelamento
|
89
|
+
# @return [DateTime]
|
90
|
+
attr_accessor :canceled_at
|
91
|
+
|
92
|
+
# Data de fechamento
|
93
|
+
# @return [DateTime]
|
94
|
+
attr_accessor :closed_at
|
95
|
+
|
96
|
+
# Data de expiração
|
97
|
+
# @return [DateTime]
|
98
|
+
attr_accessor :expires_at
|
99
|
+
|
100
|
+
# A mapping from model property names to API property names.
|
101
|
+
def self.names
|
102
|
+
@_hash = {} if @_hash.nil?
|
103
|
+
@_hash['id'] = 'id'
|
104
|
+
@_hash['default_payment_method'] = 'default_payment_method'
|
105
|
+
@_hash['success_url'] = 'success_url'
|
106
|
+
@_hash['payment_url'] = 'payment_url'
|
107
|
+
@_hash['gateway_affiliation_id'] = 'gateway_affiliation_id'
|
108
|
+
@_hash['accepted_payment_methods'] = 'accepted_payment_methods'
|
109
|
+
@_hash['status'] = 'status'
|
110
|
+
@_hash['skip_checkout_success_page'] = 'skip_checkout_success_page'
|
111
|
+
@_hash['created_at'] = 'created_at'
|
112
|
+
@_hash['updated_at'] = 'updated_at'
|
113
|
+
@_hash['customer_editable'] = 'customer_editable'
|
114
|
+
@_hash['customer'] = 'customer'
|
115
|
+
@_hash['billingaddress'] = 'billingaddress'
|
116
|
+
@_hash['credit_card'] = 'credit_Card'
|
117
|
+
@_hash['boleto'] = 'boleto'
|
118
|
+
@_hash['billing_address_editable'] = 'billing_address_editable'
|
119
|
+
@_hash['shipping'] = 'shipping'
|
120
|
+
@_hash['shippable'] = 'shippable'
|
121
|
+
@_hash['currency'] = 'currency'
|
122
|
+
@_hash['amount'] = 'amount'
|
123
|
+
@_hash['canceled_at'] = 'canceled_at'
|
124
|
+
@_hash['closed_at'] = 'closed_at'
|
125
|
+
@_hash['expires_at'] = 'expires_at'
|
126
|
+
@_hash
|
127
|
+
end
|
128
|
+
|
129
|
+
def initialize(id = nil,
|
130
|
+
default_payment_method = nil,
|
131
|
+
success_url = nil,
|
132
|
+
payment_url = nil,
|
133
|
+
gateway_affiliation_id = nil,
|
134
|
+
accepted_payment_methods = nil,
|
135
|
+
status = nil,
|
136
|
+
skip_checkout_success_page = nil,
|
137
|
+
created_at = nil,
|
138
|
+
updated_at = nil,
|
139
|
+
customer_editable = nil,
|
140
|
+
customer = nil,
|
141
|
+
billingaddress = nil,
|
142
|
+
credit_card = nil,
|
143
|
+
boleto = nil,
|
144
|
+
billing_address_editable = nil,
|
145
|
+
shipping = nil,
|
146
|
+
shippable = nil,
|
147
|
+
currency = nil,
|
148
|
+
amount = nil,
|
149
|
+
canceled_at = nil,
|
150
|
+
closed_at = nil,
|
151
|
+
expires_at = nil)
|
152
|
+
@id = id
|
153
|
+
@default_payment_method = default_payment_method
|
154
|
+
@success_url = success_url
|
155
|
+
@payment_url = payment_url
|
156
|
+
@gateway_affiliation_id = gateway_affiliation_id
|
157
|
+
@accepted_payment_methods = accepted_payment_methods
|
158
|
+
@status = status
|
159
|
+
@skip_checkout_success_page = skip_checkout_success_page
|
160
|
+
@created_at = created_at
|
161
|
+
@updated_at = updated_at
|
162
|
+
@customer_editable = customer_editable
|
163
|
+
@customer = customer
|
164
|
+
@billingaddress = billingaddress
|
165
|
+
@credit_card = credit_card
|
166
|
+
@boleto = boleto
|
167
|
+
@billing_address_editable = billing_address_editable
|
168
|
+
@shipping = shipping
|
169
|
+
@shippable = shippable
|
170
|
+
@currency = currency
|
171
|
+
@amount = amount
|
172
|
+
@canceled_at = canceled_at
|
173
|
+
@closed_at = closed_at
|
174
|
+
@expires_at = expires_at
|
175
|
+
end
|
176
|
+
|
177
|
+
# Creates an instance of the object from a hash.
|
178
|
+
def self.from_hash(hash)
|
179
|
+
return nil unless hash
|
180
|
+
|
181
|
+
# Extract variables from the hash.
|
182
|
+
id = hash['id']
|
183
|
+
default_payment_method = hash['default_payment_method']
|
184
|
+
success_url = hash['success_url']
|
185
|
+
payment_url = hash['payment_url']
|
186
|
+
gateway_affiliation_id = hash['gateway_affiliation_id']
|
187
|
+
accepted_payment_methods = hash['accepted_payment_methods']
|
188
|
+
status = hash['status']
|
189
|
+
skip_checkout_success_page = hash['skip_checkout_success_page']
|
190
|
+
created_at = DateTime.rfc3339(hash['created_at']) if hash['created_at']
|
191
|
+
updated_at = DateTime.rfc3339(hash['updated_at']) if hash['updated_at']
|
192
|
+
customer_editable = hash['customer_editable']
|
193
|
+
customer = GetCustomerResponse.from_hash(hash['customer']) if
|
194
|
+
hash['customer']
|
195
|
+
billingaddress = GetAddressResponse.from_hash(hash['billingaddress']) if
|
196
|
+
hash['billingaddress']
|
197
|
+
credit_card = GetCheckoutCardPaymentResponse.from_hash(hash['credit_Card']) if
|
198
|
+
hash['credit_Card']
|
199
|
+
boleto = GetCheckoutBoletoPaymentResponse.from_hash(hash['boleto']) if
|
200
|
+
hash['boleto']
|
201
|
+
billing_address_editable = hash['billing_address_editable']
|
202
|
+
shipping = GetShippingResponse.from_hash(hash['shipping']) if
|
203
|
+
hash['shipping']
|
204
|
+
shippable = hash['shippable']
|
205
|
+
currency = hash['currency']
|
206
|
+
amount = hash['amount']
|
207
|
+
canceled_at = DateTime.rfc3339(hash['canceled_at']) if
|
208
|
+
hash['canceled_at']
|
209
|
+
closed_at = DateTime.rfc3339(hash['closed_at']) if hash['closed_at']
|
210
|
+
expires_at = DateTime.rfc3339(hash['expires_at']) if hash['expires_at']
|
211
|
+
|
212
|
+
# Create object from extracted values.
|
213
|
+
GetCheckoutPaymentResponse.new(id,
|
214
|
+
default_payment_method,
|
215
|
+
success_url,
|
216
|
+
payment_url,
|
217
|
+
gateway_affiliation_id,
|
218
|
+
accepted_payment_methods,
|
219
|
+
status,
|
220
|
+
skip_checkout_success_page,
|
221
|
+
created_at,
|
222
|
+
updated_at,
|
223
|
+
customer_editable,
|
224
|
+
customer,
|
225
|
+
billingaddress,
|
226
|
+
credit_card,
|
227
|
+
boleto,
|
228
|
+
billing_address_editable,
|
229
|
+
shipping,
|
230
|
+
shippable,
|
231
|
+
currency,
|
232
|
+
amount,
|
233
|
+
canceled_at,
|
234
|
+
closed_at,
|
235
|
+
expires_at)
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|
@@ -38,17 +38,15 @@ module MundiApi
|
|
38
38
|
|
39
39
|
# A mapping from model property names to API property names.
|
40
40
|
def self.names
|
41
|
-
if @_hash.nil?
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
@_hash['gateway_affiliation_id'] = 'gateway_affiliation_id'
|
51
|
-
end
|
41
|
+
@_hash = {} if @_hash.nil?
|
42
|
+
@_hash['success_url'] = 'success_url'
|
43
|
+
@_hash['payment_url'] = 'payment_url'
|
44
|
+
@_hash['accepted_payment_methods'] = 'accepted_payment_methods'
|
45
|
+
@_hash['status'] = 'status'
|
46
|
+
@_hash['customer'] = 'customer'
|
47
|
+
@_hash['amount'] = 'amount'
|
48
|
+
@_hash['default_payment_method'] = 'default_payment_method'
|
49
|
+
@_hash['gateway_affiliation_id'] = 'gateway_affiliation_id'
|
52
50
|
@_hash
|
53
51
|
end
|
54
52
|
|
@@ -43,26 +43,29 @@ module MundiApi
|
|
43
43
|
# @return [String]
|
44
44
|
attr_accessor :acquirer_message
|
45
45
|
|
46
|
+
# Acquirer Return Code
|
47
|
+
# @return [String]
|
48
|
+
attr_accessor :acquirer_return_code
|
49
|
+
|
46
50
|
# Number of installments
|
47
51
|
# @return [Integer]
|
48
52
|
attr_accessor :installments
|
49
53
|
|
50
54
|
# A mapping from model property names to API property names.
|
51
55
|
def self.names
|
52
|
-
if @_hash.nil?
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
end
|
56
|
+
@_hash = {} if @_hash.nil?
|
57
|
+
@_hash['statement_descriptor'] = 'statement_descriptor'
|
58
|
+
@_hash['acquirer_name'] = 'acquirer_name'
|
59
|
+
@_hash['acquirer_affiliation_code'] = 'acquirer_affiliation_code'
|
60
|
+
@_hash['acquirer_tid'] = 'acquirer_tid'
|
61
|
+
@_hash['acquirer_nsu'] = 'acquirer_nsu'
|
62
|
+
@_hash['acquirer_auth_code'] = 'acquirer_auth_code'
|
63
|
+
@_hash['operation_type'] = 'operation_type'
|
64
|
+
@_hash['card'] = 'card'
|
65
|
+
@_hash['acquirer_message'] = 'acquirer_message'
|
66
|
+
@_hash['acquirer_return_code'] = 'acquirer_return_code'
|
67
|
+
@_hash['installments'] = 'installments'
|
68
|
+
@_hash = super().merge(@_hash)
|
66
69
|
@_hash
|
67
70
|
end
|
68
71
|
|
@@ -75,6 +78,7 @@ module MundiApi
|
|
75
78
|
operation_type = nil,
|
76
79
|
card = nil,
|
77
80
|
acquirer_message = nil,
|
81
|
+
acquirer_return_code = nil,
|
78
82
|
gateway_id = nil,
|
79
83
|
amount = nil,
|
80
84
|
status = nil,
|
@@ -83,6 +87,8 @@ module MundiApi
|
|
83
87
|
updated_at = nil,
|
84
88
|
attempt_count = nil,
|
85
89
|
max_attempts = nil,
|
90
|
+
splits = nil,
|
91
|
+
id = nil,
|
86
92
|
installments = nil,
|
87
93
|
next_attempt = nil,
|
88
94
|
transaction_type = nil)
|
@@ -95,6 +101,7 @@ module MundiApi
|
|
95
101
|
@operation_type = operation_type
|
96
102
|
@card = card
|
97
103
|
@acquirer_message = acquirer_message
|
104
|
+
@acquirer_return_code = acquirer_return_code
|
98
105
|
@installments = installments
|
99
106
|
|
100
107
|
# Call the constructor of the base class
|
@@ -106,6 +113,8 @@ module MundiApi
|
|
106
113
|
updated_at,
|
107
114
|
attempt_count,
|
108
115
|
max_attempts,
|
116
|
+
splits,
|
117
|
+
id,
|
109
118
|
next_attempt,
|
110
119
|
transaction_type)
|
111
120
|
end
|
@@ -124,6 +133,7 @@ module MundiApi
|
|
124
133
|
operation_type = hash['operation_type']
|
125
134
|
card = GetCardResponse.from_hash(hash['card']) if hash['card']
|
126
135
|
acquirer_message = hash['acquirer_message']
|
136
|
+
acquirer_return_code = hash['acquirer_return_code']
|
127
137
|
gateway_id = hash['gateway_id']
|
128
138
|
amount = hash['amount']
|
129
139
|
status = hash['status']
|
@@ -132,6 +142,15 @@ module MundiApi
|
|
132
142
|
updated_at = DateTime.rfc3339(hash['updated_at']) if hash['updated_at']
|
133
143
|
attempt_count = hash['attempt_count']
|
134
144
|
max_attempts = hash['max_attempts']
|
145
|
+
# Parameter is an array, so we need to iterate through it
|
146
|
+
splits = nil
|
147
|
+
unless hash['splits'].nil?
|
148
|
+
splits = []
|
149
|
+
hash['splits'].each do |structure|
|
150
|
+
splits << (GetSplitResponse.from_hash(structure) if structure)
|
151
|
+
end
|
152
|
+
end
|
153
|
+
id = hash['id']
|
135
154
|
installments = hash['installments']
|
136
155
|
next_attempt = DateTime.rfc3339(hash['next_attempt']) if
|
137
156
|
hash['next_attempt']
|
@@ -147,6 +166,7 @@ module MundiApi
|
|
147
166
|
operation_type,
|
148
167
|
card,
|
149
168
|
acquirer_message,
|
169
|
+
acquirer_return_code,
|
150
170
|
gateway_id,
|
151
171
|
amount,
|
152
172
|
status,
|
@@ -155,6 +175,8 @@ module MundiApi
|
|
155
175
|
updated_at,
|
156
176
|
attempt_count,
|
157
177
|
max_attempts,
|
178
|
+
splits,
|
179
|
+
id,
|
158
180
|
installments,
|
159
181
|
next_attempt,
|
160
182
|
transaction_type)
|
@@ -53,28 +53,31 @@ module MundiApi
|
|
53
53
|
# @return [GetPhonesResponse]
|
54
54
|
attr_accessor :phones
|
55
55
|
|
56
|
-
#
|
56
|
+
# Código de referência do cliente no sistema da loja. Max: 52 caracteres
|
57
|
+
# @return [String]
|
58
|
+
attr_accessor :code
|
59
|
+
|
60
|
+
# Código de referência do cliente no sistema da loja. Max: 52 caracteres
|
57
61
|
# @return [Long]
|
58
62
|
attr_accessor :fb_id
|
59
63
|
|
60
64
|
# A mapping from model property names to API property names.
|
61
65
|
def self.names
|
62
|
-
if @_hash.nil?
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
end
|
66
|
+
@_hash = {} if @_hash.nil?
|
67
|
+
@_hash['id'] = 'id'
|
68
|
+
@_hash['name'] = 'name'
|
69
|
+
@_hash['email'] = 'email'
|
70
|
+
@_hash['delinquent'] = 'delinquent'
|
71
|
+
@_hash['created_at'] = 'created_at'
|
72
|
+
@_hash['updated_at'] = 'updated_at'
|
73
|
+
@_hash['document'] = 'document'
|
74
|
+
@_hash['type'] = 'type'
|
75
|
+
@_hash['fb_access_token'] = 'fb_access_token'
|
76
|
+
@_hash['address'] = 'address'
|
77
|
+
@_hash['metadata'] = 'metadata'
|
78
|
+
@_hash['phones'] = 'phones'
|
79
|
+
@_hash['code'] = 'code'
|
80
|
+
@_hash['fb_id'] = 'fb_id'
|
78
81
|
@_hash
|
79
82
|
end
|
80
83
|
|
@@ -90,6 +93,7 @@ module MundiApi
|
|
90
93
|
address = nil,
|
91
94
|
metadata = nil,
|
92
95
|
phones = nil,
|
96
|
+
code = nil,
|
93
97
|
fb_id = nil)
|
94
98
|
@id = id
|
95
99
|
@name = name
|
@@ -103,6 +107,7 @@ module MundiApi
|
|
103
107
|
@address = address
|
104
108
|
@metadata = metadata
|
105
109
|
@phones = phones
|
110
|
+
@code = code
|
106
111
|
@fb_id = fb_id
|
107
112
|
end
|
108
113
|
|
@@ -124,6 +129,7 @@ module MundiApi
|
|
124
129
|
hash['address']
|
125
130
|
metadata = hash['metadata']
|
126
131
|
phones = GetPhonesResponse.from_hash(hash['phones']) if hash['phones']
|
132
|
+
code = hash['code']
|
127
133
|
fb_id = hash['fb_id']
|
128
134
|
|
129
135
|
# Create object from extracted values.
|
@@ -139,6 +145,7 @@ module MundiApi
|
|
139
145
|
address,
|
140
146
|
metadata,
|
141
147
|
phones,
|
148
|
+
code,
|
142
149
|
fb_id)
|
143
150
|
end
|
144
151
|
end
|