mundi_api 0.9.1 → 0.13.7
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/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
@@ -36,19 +36,27 @@ module MundiApi
|
|
36
36
|
# @return [String]
|
37
37
|
attr_accessor :complement
|
38
38
|
|
39
|
+
# Line 1 for address
|
40
|
+
# @return [String]
|
41
|
+
attr_accessor :line_1
|
42
|
+
|
43
|
+
# Line 2 for address
|
44
|
+
# @return [String]
|
45
|
+
attr_accessor :line_2
|
46
|
+
|
39
47
|
# A mapping from model property names to API property names.
|
40
48
|
def self.names
|
41
|
-
if @_hash.nil?
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
49
|
+
@_hash = {} if @_hash.nil?
|
50
|
+
@_hash['street'] = 'street'
|
51
|
+
@_hash['number'] = 'number'
|
52
|
+
@_hash['zip_code'] = 'zip_code'
|
53
|
+
@_hash['neighborhood'] = 'neighborhood'
|
54
|
+
@_hash['city'] = 'city'
|
55
|
+
@_hash['state'] = 'state'
|
56
|
+
@_hash['country'] = 'country'
|
57
|
+
@_hash['complement'] = 'complement'
|
58
|
+
@_hash['line_1'] = 'line_1'
|
59
|
+
@_hash['line_2'] = 'line_2'
|
52
60
|
@_hash
|
53
61
|
end
|
54
62
|
|
@@ -59,7 +67,9 @@ module MundiApi
|
|
59
67
|
city = nil,
|
60
68
|
state = nil,
|
61
69
|
country = nil,
|
62
|
-
complement = nil
|
70
|
+
complement = nil,
|
71
|
+
line_1 = nil,
|
72
|
+
line_2 = nil)
|
63
73
|
@street = street
|
64
74
|
@number = number
|
65
75
|
@zip_code = zip_code
|
@@ -68,6 +78,8 @@ module MundiApi
|
|
68
78
|
@state = state
|
69
79
|
@country = country
|
70
80
|
@complement = complement
|
81
|
+
@line_1 = line_1
|
82
|
+
@line_2 = line_2
|
71
83
|
end
|
72
84
|
|
73
85
|
# Creates an instance of the object from a hash.
|
@@ -83,6 +95,8 @@ module MundiApi
|
|
83
95
|
state = hash['state']
|
84
96
|
country = hash['country']
|
85
97
|
complement = hash['complement']
|
98
|
+
line_1 = hash['line_1']
|
99
|
+
line_2 = hash['line_2']
|
86
100
|
|
87
101
|
# Create object from extracted values.
|
88
102
|
GetBillingAddressResponse.new(street,
|
@@ -92,7 +106,9 @@ module MundiApi
|
|
92
106
|
city,
|
93
107
|
state,
|
94
108
|
country,
|
95
|
-
complement
|
109
|
+
complement,
|
110
|
+
line_1,
|
111
|
+
line_2)
|
96
112
|
end
|
97
113
|
end
|
98
114
|
end
|
@@ -35,19 +35,57 @@ module MundiApi
|
|
35
35
|
# @return [GetBillingAddressResponse]
|
36
36
|
attr_accessor :billing_address
|
37
37
|
|
38
|
+
# TODO: Write general description for this method
|
39
|
+
# @return [String]
|
40
|
+
attr_accessor :qr_code
|
41
|
+
|
42
|
+
# TODO: Write general description for this method
|
43
|
+
# @return [String]
|
44
|
+
attr_accessor :line
|
45
|
+
|
46
|
+
# TODO: Write general description for this method
|
47
|
+
# @return [String]
|
48
|
+
attr_accessor :pdf_password
|
49
|
+
|
50
|
+
# TODO: Write general description for this method
|
51
|
+
# @return [String]
|
52
|
+
attr_accessor :pdf
|
53
|
+
|
54
|
+
# TODO: Write general description for this method
|
55
|
+
# @return [String]
|
56
|
+
attr_accessor :paid_amount
|
57
|
+
|
58
|
+
# TODO: Write general description for this method
|
59
|
+
# @return [String]
|
60
|
+
attr_accessor :type
|
61
|
+
|
62
|
+
# TODO: Write general description for this method
|
63
|
+
# @return [DateTime]
|
64
|
+
attr_accessor :due_at
|
65
|
+
|
66
|
+
# TODO: Write general description for this method
|
67
|
+
# @return [DateTime]
|
68
|
+
attr_accessor :paid_at
|
69
|
+
|
38
70
|
# A mapping from model property names to API property names.
|
39
71
|
def self.names
|
40
|
-
if @_hash.nil?
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
72
|
+
@_hash = {} if @_hash.nil?
|
73
|
+
@_hash['url'] = 'url'
|
74
|
+
@_hash['bar_code'] = 'bar_code'
|
75
|
+
@_hash['nosso_numero'] = 'nosso_numero'
|
76
|
+
@_hash['bank'] = 'bank'
|
77
|
+
@_hash['document_number'] = 'document_number'
|
78
|
+
@_hash['instructions'] = 'instructions'
|
79
|
+
@_hash['billing_address'] = 'billing_address'
|
80
|
+
@_hash['qr_code'] = 'qr_code'
|
81
|
+
@_hash['line'] = 'line'
|
82
|
+
@_hash['pdf_password'] = 'pdf_password'
|
83
|
+
@_hash['pdf'] = 'pdf'
|
84
|
+
@_hash['paid_amount'] = 'paid_amount'
|
85
|
+
@_hash['type'] = 'type'
|
86
|
+
@_hash['due_at'] = 'due_at'
|
87
|
+
@_hash['paid_at'] = 'paid_at'
|
88
|
+
@_hash = super().merge(@_hash)
|
51
89
|
@_hash
|
52
90
|
end
|
53
91
|
|
@@ -58,6 +96,12 @@ module MundiApi
|
|
58
96
|
document_number = nil,
|
59
97
|
instructions = nil,
|
60
98
|
billing_address = nil,
|
99
|
+
qr_code = nil,
|
100
|
+
line = nil,
|
101
|
+
pdf_password = nil,
|
102
|
+
pdf = nil,
|
103
|
+
paid_amount = nil,
|
104
|
+
type = nil,
|
61
105
|
gateway_id = nil,
|
62
106
|
amount = nil,
|
63
107
|
status = nil,
|
@@ -66,6 +110,10 @@ module MundiApi
|
|
66
110
|
updated_at = nil,
|
67
111
|
attempt_count = nil,
|
68
112
|
max_attempts = nil,
|
113
|
+
splits = nil,
|
114
|
+
id = nil,
|
115
|
+
due_at = nil,
|
116
|
+
paid_at = nil,
|
69
117
|
next_attempt = nil,
|
70
118
|
transaction_type = nil)
|
71
119
|
@url = url
|
@@ -75,6 +123,14 @@ module MundiApi
|
|
75
123
|
@document_number = document_number
|
76
124
|
@instructions = instructions
|
77
125
|
@billing_address = billing_address
|
126
|
+
@qr_code = qr_code
|
127
|
+
@line = line
|
128
|
+
@pdf_password = pdf_password
|
129
|
+
@pdf = pdf
|
130
|
+
@paid_amount = paid_amount
|
131
|
+
@type = type
|
132
|
+
@due_at = due_at
|
133
|
+
@paid_at = paid_at
|
78
134
|
|
79
135
|
# Call the constructor of the base class
|
80
136
|
super(gateway_id,
|
@@ -85,6 +141,8 @@ module MundiApi
|
|
85
141
|
updated_at,
|
86
142
|
attempt_count,
|
87
143
|
max_attempts,
|
144
|
+
splits,
|
145
|
+
id,
|
88
146
|
next_attempt,
|
89
147
|
transaction_type)
|
90
148
|
end
|
@@ -102,6 +160,12 @@ module MundiApi
|
|
102
160
|
instructions = hash['instructions']
|
103
161
|
billing_address = GetBillingAddressResponse.from_hash(hash['billing_address']) if
|
104
162
|
hash['billing_address']
|
163
|
+
qr_code = hash['qr_code']
|
164
|
+
line = hash['line']
|
165
|
+
pdf_password = hash['pdf_password']
|
166
|
+
pdf = hash['pdf']
|
167
|
+
paid_amount = hash['paid_amount']
|
168
|
+
type = hash['type']
|
105
169
|
gateway_id = hash['gateway_id']
|
106
170
|
amount = hash['amount']
|
107
171
|
status = hash['status']
|
@@ -110,6 +174,17 @@ module MundiApi
|
|
110
174
|
updated_at = DateTime.rfc3339(hash['updated_at']) if hash['updated_at']
|
111
175
|
attempt_count = hash['attempt_count']
|
112
176
|
max_attempts = hash['max_attempts']
|
177
|
+
# Parameter is an array, so we need to iterate through it
|
178
|
+
splits = nil
|
179
|
+
unless hash['splits'].nil?
|
180
|
+
splits = []
|
181
|
+
hash['splits'].each do |structure|
|
182
|
+
splits << (GetSplitResponse.from_hash(structure) if structure)
|
183
|
+
end
|
184
|
+
end
|
185
|
+
id = hash['id']
|
186
|
+
due_at = DateTime.rfc3339(hash['due_at']) if hash['due_at']
|
187
|
+
paid_at = DateTime.rfc3339(hash['paid_at']) if hash['paid_at']
|
113
188
|
next_attempt = DateTime.rfc3339(hash['next_attempt']) if
|
114
189
|
hash['next_attempt']
|
115
190
|
transaction_type = hash['transaction_type']
|
@@ -122,6 +197,12 @@ module MundiApi
|
|
122
197
|
document_number,
|
123
198
|
instructions,
|
124
199
|
billing_address,
|
200
|
+
qr_code,
|
201
|
+
line,
|
202
|
+
pdf_password,
|
203
|
+
pdf,
|
204
|
+
paid_amount,
|
205
|
+
type,
|
125
206
|
gateway_id,
|
126
207
|
amount,
|
127
208
|
status,
|
@@ -130,6 +211,10 @@ module MundiApi
|
|
130
211
|
updated_at,
|
131
212
|
attempt_count,
|
132
213
|
max_attempts,
|
214
|
+
splits,
|
215
|
+
id,
|
216
|
+
due_at,
|
217
|
+
paid_at,
|
133
218
|
next_attempt,
|
134
219
|
transaction_type)
|
135
220
|
end
|
@@ -67,24 +67,22 @@ module MundiApi
|
|
67
67
|
|
68
68
|
# A mapping from model property names to API property names.
|
69
69
|
def self.names
|
70
|
-
if @_hash.nil?
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
@_hash['deleted_at'] = 'deleted_at'
|
87
|
-
end
|
70
|
+
@_hash = {} if @_hash.nil?
|
71
|
+
@_hash['id'] = 'id'
|
72
|
+
@_hash['last_four_digits'] = 'last_four_digits'
|
73
|
+
@_hash['brand'] = 'brand'
|
74
|
+
@_hash['holder_name'] = 'holder_name'
|
75
|
+
@_hash['exp_month'] = 'exp_month'
|
76
|
+
@_hash['exp_year'] = 'exp_year'
|
77
|
+
@_hash['status'] = 'status'
|
78
|
+
@_hash['created_at'] = 'created_at'
|
79
|
+
@_hash['updated_at'] = 'updated_at'
|
80
|
+
@_hash['billing_address'] = 'billing_address'
|
81
|
+
@_hash['customer'] = 'customer'
|
82
|
+
@_hash['metadata'] = 'metadata'
|
83
|
+
@_hash['type'] = 'type'
|
84
|
+
@_hash['holder_document'] = 'holder_document'
|
85
|
+
@_hash['deleted_at'] = 'deleted_at'
|
88
86
|
@_hash
|
89
87
|
end
|
90
88
|
|
@@ -34,16 +34,14 @@ module MundiApi
|
|
34
34
|
|
35
35
|
# A mapping from model property names to API property names.
|
36
36
|
def self.names
|
37
|
-
if @_hash.nil?
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
@_hash['type'] = 'type'
|
46
|
-
end
|
37
|
+
@_hash = {} if @_hash.nil?
|
38
|
+
@_hash['last_four_digits'] = 'last_four_digits'
|
39
|
+
@_hash['holder_name'] = 'holder_name'
|
40
|
+
@_hash['holder_document'] = 'holder_document'
|
41
|
+
@_hash['exp_month'] = 'exp_month'
|
42
|
+
@_hash['exp_year'] = 'exp_year'
|
43
|
+
@_hash['brand'] = 'brand'
|
44
|
+
@_hash['type'] = 'type'
|
47
45
|
@_hash
|
48
46
|
end
|
49
47
|
|
@@ -75,26 +75,24 @@ module MundiApi
|
|
75
75
|
|
76
76
|
# A mapping from model property names to API property names.
|
77
77
|
def self.names
|
78
|
-
if @_hash.nil?
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
@_hash['canceled_at'] = 'canceled_at'
|
97
|
-
end
|
78
|
+
@_hash = {} if @_hash.nil?
|
79
|
+
@_hash['id'] = 'id'
|
80
|
+
@_hash['code'] = 'code'
|
81
|
+
@_hash['gateway_id'] = 'gateway_id'
|
82
|
+
@_hash['amount'] = 'amount'
|
83
|
+
@_hash['status'] = 'status'
|
84
|
+
@_hash['currency'] = 'currency'
|
85
|
+
@_hash['payment_method'] = 'payment_method'
|
86
|
+
@_hash['due_at'] = 'due_at'
|
87
|
+
@_hash['created_at'] = 'created_at'
|
88
|
+
@_hash['updated_at'] = 'updated_at'
|
89
|
+
@_hash['last_transaction'] = 'last_transaction'
|
90
|
+
@_hash['invoice'] = 'invoice'
|
91
|
+
@_hash['order'] = 'order'
|
92
|
+
@_hash['customer'] = 'customer'
|
93
|
+
@_hash['metadata'] = 'metadata'
|
94
|
+
@_hash['paid_at'] = 'paid_at'
|
95
|
+
@_hash['canceled_at'] = 'canceled_at'
|
98
96
|
@_hash
|
99
97
|
end
|
100
98
|
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# This file was automatically generated by APIMATIC v2.0
|
2
|
+
# ( https://apimatic.io ).
|
3
|
+
|
4
|
+
require 'date'
|
5
|
+
module MundiApi
|
6
|
+
# GetCheckoutBoletoPaymentResponse Model.
|
7
|
+
class GetCheckoutBoletoPaymentResponse < BaseModel
|
8
|
+
# Data de vencimento do boleto
|
9
|
+
# @return [DateTime]
|
10
|
+
attr_accessor :due_at
|
11
|
+
|
12
|
+
# Instruções do boleto
|
13
|
+
# @return [String]
|
14
|
+
attr_accessor :instructions
|
15
|
+
|
16
|
+
# A mapping from model property names to API property names.
|
17
|
+
def self.names
|
18
|
+
@_hash = {} if @_hash.nil?
|
19
|
+
@_hash['due_at'] = 'due_at'
|
20
|
+
@_hash['instructions'] = 'instructions'
|
21
|
+
@_hash
|
22
|
+
end
|
23
|
+
|
24
|
+
def initialize(due_at = nil,
|
25
|
+
instructions = nil)
|
26
|
+
@due_at = due_at
|
27
|
+
@instructions = instructions
|
28
|
+
end
|
29
|
+
|
30
|
+
# Creates an instance of the object from a hash.
|
31
|
+
def self.from_hash(hash)
|
32
|
+
return nil unless hash
|
33
|
+
|
34
|
+
# Extract variables from the hash.
|
35
|
+
due_at = DateTime.rfc3339(hash['due_at']) if hash['due_at']
|
36
|
+
instructions = hash['instructions']
|
37
|
+
|
38
|
+
# Create object from extracted values.
|
39
|
+
GetCheckoutBoletoPaymentResponse.new(due_at,
|
40
|
+
instructions)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# This file was automatically generated by APIMATIC v2.0
|
2
|
+
# ( https://apimatic.io ).
|
3
|
+
|
4
|
+
module MundiApi
|
5
|
+
# GetCheckoutCardInstallmentOptionsResponse Model.
|
6
|
+
class GetCheckoutCardInstallmentOptionsResponse < BaseModel
|
7
|
+
# Número de parcelas
|
8
|
+
# @return [String]
|
9
|
+
attr_accessor :number
|
10
|
+
|
11
|
+
# Valor total da compra
|
12
|
+
# @return [Integer]
|
13
|
+
attr_accessor :total
|
14
|
+
|
15
|
+
# A mapping from model property names to API property names.
|
16
|
+
def self.names
|
17
|
+
@_hash = {} if @_hash.nil?
|
18
|
+
@_hash['number'] = 'number'
|
19
|
+
@_hash['total'] = 'total'
|
20
|
+
@_hash
|
21
|
+
end
|
22
|
+
|
23
|
+
def initialize(number = nil,
|
24
|
+
total = nil)
|
25
|
+
@number = number
|
26
|
+
@total = total
|
27
|
+
end
|
28
|
+
|
29
|
+
# Creates an instance of the object from a hash.
|
30
|
+
def self.from_hash(hash)
|
31
|
+
return nil unless hash
|
32
|
+
|
33
|
+
# Extract variables from the hash.
|
34
|
+
number = hash['number']
|
35
|
+
total = hash['total']
|
36
|
+
|
37
|
+
# Create object from extracted values.
|
38
|
+
GetCheckoutCardInstallmentOptionsResponse.new(number,
|
39
|
+
total)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# This file was automatically generated by APIMATIC v2.0
|
2
|
+
# ( https://apimatic.io ).
|
3
|
+
|
4
|
+
module MundiApi
|
5
|
+
# GetCheckoutCardPaymentResponse Model.
|
6
|
+
class GetCheckoutCardPaymentResponse < BaseModel
|
7
|
+
# Descrição na fatura
|
8
|
+
# @return [String]
|
9
|
+
attr_accessor :statement_descriptor
|
10
|
+
|
11
|
+
# Parcelas
|
12
|
+
# @return [List of GetCheckoutCardInstallmentOptionsResponse]
|
13
|
+
attr_accessor :installments
|
14
|
+
|
15
|
+
# A mapping from model property names to API property names.
|
16
|
+
def self.names
|
17
|
+
@_hash = {} if @_hash.nil?
|
18
|
+
@_hash['statement_descriptor'] = 'statementDescriptor'
|
19
|
+
@_hash['installments'] = 'installments'
|
20
|
+
@_hash
|
21
|
+
end
|
22
|
+
|
23
|
+
def initialize(statement_descriptor = nil,
|
24
|
+
installments = nil)
|
25
|
+
@statement_descriptor = statement_descriptor
|
26
|
+
@installments = installments
|
27
|
+
end
|
28
|
+
|
29
|
+
# Creates an instance of the object from a hash.
|
30
|
+
def self.from_hash(hash)
|
31
|
+
return nil unless hash
|
32
|
+
|
33
|
+
# Extract variables from the hash.
|
34
|
+
statement_descriptor = hash['statementDescriptor']
|
35
|
+
# Parameter is an array, so we need to iterate through it
|
36
|
+
installments = nil
|
37
|
+
unless hash['installments'].nil?
|
38
|
+
installments = []
|
39
|
+
hash['installments'].each do |structure|
|
40
|
+
installments << (GetCheckoutCardInstallmentOptionsResponse.from_hash(structure) if structure)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# Create object from extracted values.
|
45
|
+
GetCheckoutCardPaymentResponse.new(statement_descriptor,
|
46
|
+
installments)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|