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
@@ -22,13 +22,11 @@ module MundiApi
|
|
22
22
|
|
23
23
|
# A mapping from model property names to API property names.
|
24
24
|
def self.names
|
25
|
-
if @_hash.nil?
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
@_hash['status'] = 'status'
|
31
|
-
end
|
25
|
+
@_hash = {} if @_hash.nil?
|
26
|
+
@_hash['id'] = 'id'
|
27
|
+
@_hash['description'] = 'description'
|
28
|
+
@_hash['amount'] = 'amount'
|
29
|
+
@_hash['status'] = 'status'
|
32
30
|
@_hash
|
33
31
|
end
|
34
32
|
|
@@ -26,14 +26,12 @@ module MundiApi
|
|
26
26
|
|
27
27
|
# A mapping from model property names to API property names.
|
28
28
|
def self.names
|
29
|
-
if @_hash.nil?
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
@_hash['address'] = 'address'
|
36
|
-
end
|
29
|
+
@_hash = {} if @_hash.nil?
|
30
|
+
@_hash['amount'] = 'amount'
|
31
|
+
@_hash['description'] = 'description'
|
32
|
+
@_hash['recipient_name'] = 'recipient_name'
|
33
|
+
@_hash['recipient_phone'] = 'recipient_phone'
|
34
|
+
@_hash['address'] = 'address'
|
37
35
|
@_hash
|
38
36
|
end
|
39
37
|
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# This file was automatically generated by APIMATIC v2.0
|
2
|
+
# ( https://apimatic.io ).
|
3
|
+
|
4
|
+
module MundiApi
|
5
|
+
# Split response
|
6
|
+
class GetSplitResponse < BaseModel
|
7
|
+
# Type
|
8
|
+
# @return [String]
|
9
|
+
attr_accessor :type
|
10
|
+
|
11
|
+
# Amount
|
12
|
+
# @return [Integer]
|
13
|
+
attr_accessor :amount
|
14
|
+
|
15
|
+
# Recipient
|
16
|
+
# @return [GetRecipientResponse]
|
17
|
+
attr_accessor :recipient
|
18
|
+
|
19
|
+
# A mapping from model property names to API property names.
|
20
|
+
def self.names
|
21
|
+
@_hash = {} if @_hash.nil?
|
22
|
+
@_hash['type'] = 'type'
|
23
|
+
@_hash['amount'] = 'amount'
|
24
|
+
@_hash['recipient'] = 'recipient'
|
25
|
+
@_hash
|
26
|
+
end
|
27
|
+
|
28
|
+
def initialize(type = nil,
|
29
|
+
amount = nil,
|
30
|
+
recipient = nil)
|
31
|
+
@type = type
|
32
|
+
@amount = amount
|
33
|
+
@recipient = recipient
|
34
|
+
end
|
35
|
+
|
36
|
+
# Creates an instance of the object from a hash.
|
37
|
+
def self.from_hash(hash)
|
38
|
+
return nil unless hash
|
39
|
+
|
40
|
+
# Extract variables from the hash.
|
41
|
+
type = hash['type']
|
42
|
+
amount = hash['amount']
|
43
|
+
recipient = GetRecipientResponse.from_hash(hash['recipient']) if
|
44
|
+
hash['recipient']
|
45
|
+
|
46
|
+
# Create object from extracted values.
|
47
|
+
GetSplitResponse.new(type,
|
48
|
+
amount,
|
49
|
+
recipient)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -37,34 +37,37 @@ module MundiApi
|
|
37
37
|
# @return [GetSubscriptionResponse]
|
38
38
|
attr_accessor :subscription
|
39
39
|
|
40
|
-
#
|
40
|
+
# Item name
|
41
|
+
# @return [String]
|
42
|
+
attr_accessor :name
|
43
|
+
|
44
|
+
# Item name
|
41
45
|
# @return [Integer]
|
42
46
|
attr_accessor :quantity
|
43
47
|
|
44
|
-
#
|
48
|
+
# Item name
|
45
49
|
# @return [Integer]
|
46
50
|
attr_accessor :cycles
|
47
51
|
|
48
|
-
#
|
52
|
+
# Item name
|
49
53
|
# @return [DateTime]
|
50
54
|
attr_accessor :deleted_at
|
51
55
|
|
52
56
|
# A mapping from model property names to API property names.
|
53
57
|
def self.names
|
54
|
-
if @_hash.nil?
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
end
|
58
|
+
@_hash = {} if @_hash.nil?
|
59
|
+
@_hash['id'] = 'id'
|
60
|
+
@_hash['description'] = 'description'
|
61
|
+
@_hash['status'] = 'status'
|
62
|
+
@_hash['created_at'] = 'created_at'
|
63
|
+
@_hash['updated_at'] = 'updated_at'
|
64
|
+
@_hash['pricing_scheme'] = 'pricing_scheme'
|
65
|
+
@_hash['discounts'] = 'discounts'
|
66
|
+
@_hash['subscription'] = 'subscription'
|
67
|
+
@_hash['name'] = 'name'
|
68
|
+
@_hash['quantity'] = 'quantity'
|
69
|
+
@_hash['cycles'] = 'cycles'
|
70
|
+
@_hash['deleted_at'] = 'deleted_at'
|
68
71
|
@_hash
|
69
72
|
end
|
70
73
|
|
@@ -76,6 +79,7 @@ module MundiApi
|
|
76
79
|
pricing_scheme = nil,
|
77
80
|
discounts = nil,
|
78
81
|
subscription = nil,
|
82
|
+
name = nil,
|
79
83
|
quantity = nil,
|
80
84
|
cycles = nil,
|
81
85
|
deleted_at = nil)
|
@@ -87,6 +91,7 @@ module MundiApi
|
|
87
91
|
@pricing_scheme = pricing_scheme
|
88
92
|
@discounts = discounts
|
89
93
|
@subscription = subscription
|
94
|
+
@name = name
|
90
95
|
@quantity = quantity
|
91
96
|
@cycles = cycles
|
92
97
|
@deleted_at = deleted_at
|
@@ -114,6 +119,7 @@ module MundiApi
|
|
114
119
|
end
|
115
120
|
subscription = GetSubscriptionResponse.from_hash(hash['subscription']) if
|
116
121
|
hash['subscription']
|
122
|
+
name = hash['name']
|
117
123
|
quantity = hash['quantity']
|
118
124
|
cycles = hash['cycles']
|
119
125
|
deleted_at = DateTime.rfc3339(hash['deleted_at']) if hash['deleted_at']
|
@@ -127,6 +133,7 @@ module MundiApi
|
|
127
133
|
pricing_scheme,
|
128
134
|
discounts,
|
129
135
|
subscription,
|
136
|
+
name,
|
130
137
|
quantity,
|
131
138
|
cycles,
|
132
139
|
deleted_at)
|
@@ -31,7 +31,7 @@ module MundiApi
|
|
31
31
|
|
32
32
|
# TODO: Write general description for this method
|
33
33
|
# @return [GetPeriodResponse]
|
34
|
-
attr_accessor :
|
34
|
+
attr_accessor :current_cycle
|
35
35
|
|
36
36
|
# TODO: Write general description for this method
|
37
37
|
# @return [String]
|
@@ -81,19 +81,23 @@ module MundiApi
|
|
81
81
|
# @return [GetSetupResponse]
|
82
82
|
attr_accessor :setup
|
83
83
|
|
84
|
-
#
|
84
|
+
# Affiliation Code
|
85
|
+
# @return [String]
|
86
|
+
attr_accessor :gateway_affiliation_id
|
87
|
+
|
88
|
+
# Affiliation Code
|
85
89
|
# @return [DateTime]
|
86
90
|
attr_accessor :next_billing_at
|
87
91
|
|
88
|
-
#
|
92
|
+
# Affiliation Code
|
89
93
|
# @return [Integer]
|
90
94
|
attr_accessor :billing_day
|
91
95
|
|
92
|
-
#
|
96
|
+
# Affiliation Code
|
93
97
|
# @return [Integer]
|
94
98
|
attr_accessor :minimum_price
|
95
99
|
|
96
|
-
#
|
100
|
+
# Affiliation Code
|
97
101
|
# @return [DateTime]
|
98
102
|
attr_accessor :canceled_at
|
99
103
|
|
@@ -103,33 +107,32 @@ module MundiApi
|
|
103
107
|
|
104
108
|
# A mapping from model property names to API property names.
|
105
109
|
def self.names
|
106
|
-
if @_hash.nil?
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
end
|
110
|
+
@_hash = {} if @_hash.nil?
|
111
|
+
@_hash['id'] = 'id'
|
112
|
+
@_hash['code'] = 'code'
|
113
|
+
@_hash['start_at'] = 'start_at'
|
114
|
+
@_hash['interval'] = 'interval'
|
115
|
+
@_hash['interval_count'] = 'interval_count'
|
116
|
+
@_hash['billing_type'] = 'billing_type'
|
117
|
+
@_hash['current_cycle'] = 'current_cycle'
|
118
|
+
@_hash['payment_method'] = 'payment_method'
|
119
|
+
@_hash['currency'] = 'currency'
|
120
|
+
@_hash['installments'] = 'installments'
|
121
|
+
@_hash['status'] = 'status'
|
122
|
+
@_hash['created_at'] = 'created_at'
|
123
|
+
@_hash['updated_at'] = 'updated_at'
|
124
|
+
@_hash['customer'] = 'customer'
|
125
|
+
@_hash['card'] = 'card'
|
126
|
+
@_hash['items'] = 'items'
|
127
|
+
@_hash['statement_descriptor'] = 'statement_descriptor'
|
128
|
+
@_hash['metadata'] = 'metadata'
|
129
|
+
@_hash['setup'] = 'setup'
|
130
|
+
@_hash['gateway_affiliation_id'] = 'gateway_affiliation_id'
|
131
|
+
@_hash['next_billing_at'] = 'next_billing_at'
|
132
|
+
@_hash['billing_day'] = 'billing_day'
|
133
|
+
@_hash['minimum_price'] = 'minimum_price'
|
134
|
+
@_hash['canceled_at'] = 'canceled_at'
|
135
|
+
@_hash['discounts'] = 'discounts'
|
133
136
|
@_hash
|
134
137
|
end
|
135
138
|
|
@@ -139,7 +142,7 @@ module MundiApi
|
|
139
142
|
interval = nil,
|
140
143
|
interval_count = nil,
|
141
144
|
billing_type = nil,
|
142
|
-
|
145
|
+
current_cycle = nil,
|
143
146
|
payment_method = nil,
|
144
147
|
currency = nil,
|
145
148
|
installments = nil,
|
@@ -152,6 +155,7 @@ module MundiApi
|
|
152
155
|
statement_descriptor = nil,
|
153
156
|
metadata = nil,
|
154
157
|
setup = nil,
|
158
|
+
gateway_affiliation_id = nil,
|
155
159
|
next_billing_at = nil,
|
156
160
|
billing_day = nil,
|
157
161
|
minimum_price = nil,
|
@@ -163,7 +167,7 @@ module MundiApi
|
|
163
167
|
@interval = interval
|
164
168
|
@interval_count = interval_count
|
165
169
|
@billing_type = billing_type
|
166
|
-
@
|
170
|
+
@current_cycle = current_cycle
|
167
171
|
@payment_method = payment_method
|
168
172
|
@currency = currency
|
169
173
|
@installments = installments
|
@@ -176,6 +180,7 @@ module MundiApi
|
|
176
180
|
@statement_descriptor = statement_descriptor
|
177
181
|
@metadata = metadata
|
178
182
|
@setup = setup
|
183
|
+
@gateway_affiliation_id = gateway_affiliation_id
|
179
184
|
@next_billing_at = next_billing_at
|
180
185
|
@billing_day = billing_day
|
181
186
|
@minimum_price = minimum_price
|
@@ -194,8 +199,8 @@ module MundiApi
|
|
194
199
|
interval = hash['interval']
|
195
200
|
interval_count = hash['interval_count']
|
196
201
|
billing_type = hash['billing_type']
|
197
|
-
|
198
|
-
hash['
|
202
|
+
current_cycle = GetPeriodResponse.from_hash(hash['current_cycle']) if
|
203
|
+
hash['current_cycle']
|
199
204
|
payment_method = hash['payment_method']
|
200
205
|
currency = hash['currency']
|
201
206
|
installments = hash['installments']
|
@@ -216,6 +221,7 @@ module MundiApi
|
|
216
221
|
statement_descriptor = hash['statement_descriptor']
|
217
222
|
metadata = hash['metadata']
|
218
223
|
setup = GetSetupResponse.from_hash(hash['setup']) if hash['setup']
|
224
|
+
gateway_affiliation_id = hash['gateway_affiliation_id']
|
219
225
|
next_billing_at = DateTime.rfc3339(hash['next_billing_at']) if
|
220
226
|
hash['next_billing_at']
|
221
227
|
billing_day = hash['billing_day']
|
@@ -238,7 +244,7 @@ module MundiApi
|
|
238
244
|
interval,
|
239
245
|
interval_count,
|
240
246
|
billing_type,
|
241
|
-
|
247
|
+
current_cycle,
|
242
248
|
payment_method,
|
243
249
|
currency,
|
244
250
|
installments,
|
@@ -251,6 +257,7 @@ module MundiApi
|
|
251
257
|
statement_descriptor,
|
252
258
|
metadata,
|
253
259
|
setup,
|
260
|
+
gateway_affiliation_id,
|
254
261
|
next_billing_at,
|
255
262
|
billing_day,
|
256
263
|
minimum_price,
|
@@ -27,14 +27,12 @@ module MundiApi
|
|
27
27
|
|
28
28
|
# A mapping from model property names to API property names.
|
29
29
|
def self.names
|
30
|
-
if @_hash.nil?
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
@_hash['card'] = 'card'
|
37
|
-
end
|
30
|
+
@_hash = {} if @_hash.nil?
|
31
|
+
@_hash['id'] = 'id'
|
32
|
+
@_hash['type'] = 'type'
|
33
|
+
@_hash['created_at'] = 'created_at'
|
34
|
+
@_hash['expires_at'] = 'expires_at'
|
35
|
+
@_hash['card'] = 'card'
|
38
36
|
@_hash
|
39
37
|
end
|
40
38
|
|
@@ -37,6 +37,14 @@ module MundiApi
|
|
37
37
|
# @return [Integer]
|
38
38
|
attr_accessor :max_attempts
|
39
39
|
|
40
|
+
# Splits
|
41
|
+
# @return [List of GetSplitResponse]
|
42
|
+
attr_accessor :splits
|
43
|
+
|
44
|
+
# Código da transação
|
45
|
+
# @return [String]
|
46
|
+
attr_accessor :id
|
47
|
+
|
40
48
|
# Date and time of the next attempt
|
41
49
|
# @return [DateTime]
|
42
50
|
attr_accessor :next_attempt
|
@@ -49,30 +57,30 @@ module MundiApi
|
|
49
57
|
def self.discriminators
|
50
58
|
if @_discriminators.nil?
|
51
59
|
@_discriminators = {}
|
52
|
-
@_discriminators['boleto'] = GetBoletoTransactionResponse.method(:from_hash)
|
53
60
|
@_discriminators['credit_card'] = GetCreditCardTransactionResponse.method(:from_hash)
|
54
61
|
@_discriminators['voucher'] = GetVoucherTransactionResponse.method(:from_hash)
|
55
62
|
@_discriminators['bank_transfer'] = GetBankTransferTransactionResponse.method(:from_hash)
|
56
63
|
@_discriminators['safetypay'] = GetSafetyPayTransactionResponse.method(:from_hash)
|
64
|
+
@_discriminators['boleto'] = GetBoletoTransactionResponse.method(:from_hash)
|
57
65
|
end
|
58
66
|
@_discriminators
|
59
67
|
end
|
60
68
|
|
61
69
|
# A mapping from model property names to API property names.
|
62
70
|
def self.names
|
63
|
-
if @_hash.nil?
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
71
|
+
@_hash = {} if @_hash.nil?
|
72
|
+
@_hash['gateway_id'] = 'gateway_id'
|
73
|
+
@_hash['amount'] = 'amount'
|
74
|
+
@_hash['status'] = 'status'
|
75
|
+
@_hash['success'] = 'success'
|
76
|
+
@_hash['created_at'] = 'created_at'
|
77
|
+
@_hash['updated_at'] = 'updated_at'
|
78
|
+
@_hash['attempt_count'] = 'attempt_count'
|
79
|
+
@_hash['max_attempts'] = 'max_attempts'
|
80
|
+
@_hash['splits'] = 'splits'
|
81
|
+
@_hash['id'] = 'id'
|
82
|
+
@_hash['next_attempt'] = 'next_attempt'
|
83
|
+
@_hash['transaction_type'] = 'transaction_type'
|
76
84
|
@_hash
|
77
85
|
end
|
78
86
|
|
@@ -84,6 +92,8 @@ module MundiApi
|
|
84
92
|
updated_at = nil,
|
85
93
|
attempt_count = nil,
|
86
94
|
max_attempts = nil,
|
95
|
+
splits = nil,
|
96
|
+
id = nil,
|
87
97
|
next_attempt = nil,
|
88
98
|
transaction_type = nil)
|
89
99
|
@gateway_id = gateway_id
|
@@ -94,6 +104,8 @@ module MundiApi
|
|
94
104
|
@updated_at = updated_at
|
95
105
|
@attempt_count = attempt_count
|
96
106
|
@max_attempts = max_attempts
|
107
|
+
@splits = splits
|
108
|
+
@id = id
|
97
109
|
@next_attempt = next_attempt
|
98
110
|
@transaction_type = transaction_type
|
99
111
|
end
|
@@ -116,6 +128,15 @@ module MundiApi
|
|
116
128
|
updated_at = DateTime.rfc3339(hash['updated_at']) if hash['updated_at']
|
117
129
|
attempt_count = hash['attempt_count']
|
118
130
|
max_attempts = hash['max_attempts']
|
131
|
+
# Parameter is an array, so we need to iterate through it
|
132
|
+
splits = nil
|
133
|
+
unless hash['splits'].nil?
|
134
|
+
splits = []
|
135
|
+
hash['splits'].each do |structure|
|
136
|
+
splits << (GetSplitResponse.from_hash(structure) if structure)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
id = hash['id']
|
119
140
|
next_attempt = DateTime.rfc3339(hash['next_attempt']) if
|
120
141
|
hash['next_attempt']
|
121
142
|
transaction_type = hash['transaction_type']
|
@@ -129,6 +150,8 @@ module MundiApi
|
|
129
150
|
updated_at,
|
130
151
|
attempt_count,
|
131
152
|
max_attempts,
|
153
|
+
splits,
|
154
|
+
id,
|
132
155
|
next_attempt,
|
133
156
|
transaction_type)
|
134
157
|
end
|