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
@@ -32,23 +32,46 @@ module MundiApi
|
|
32
32
|
# @return [Array<String, String>]
|
33
33
|
attr_accessor :metadata
|
34
34
|
|
35
|
+
# Metadata
|
36
|
+
# @return [Boolean]
|
37
|
+
attr_accessor :closed
|
38
|
+
|
35
39
|
# Defines whether the order will go through anti-fraud
|
36
40
|
# @return [Boolean]
|
37
41
|
attr_accessor :antifraud_enabled
|
38
42
|
|
43
|
+
# Ip address
|
44
|
+
# @return [String]
|
45
|
+
attr_accessor :ip
|
46
|
+
|
47
|
+
# Session id
|
48
|
+
# @return [String]
|
49
|
+
attr_accessor :session_id
|
50
|
+
|
51
|
+
# Request's location
|
52
|
+
# @return [CreateLocationRequest]
|
53
|
+
attr_accessor :location
|
54
|
+
|
55
|
+
# Device's informations
|
56
|
+
# @return [CreateDeviceRequest]
|
57
|
+
attr_accessor :device
|
58
|
+
|
39
59
|
# A mapping from model property names to API property names.
|
40
60
|
def self.names
|
41
|
-
if @_hash.nil?
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
61
|
+
@_hash = {} if @_hash.nil?
|
62
|
+
@_hash['items'] = 'items'
|
63
|
+
@_hash['customer'] = 'customer'
|
64
|
+
@_hash['payments'] = 'payments'
|
65
|
+
@_hash['code'] = 'code'
|
66
|
+
@_hash['customer_id'] = 'customer_id'
|
67
|
+
@_hash['shipping'] = 'shipping'
|
68
|
+
@_hash['metadata'] = 'metadata'
|
69
|
+
@_hash['closed'] = 'closed'
|
70
|
+
@_hash['antifraud_enabled'] = 'antifraud_enabled'
|
71
|
+
@_hash['ip'] = 'ip'
|
72
|
+
@_hash['session_id'] = 'session_id'
|
73
|
+
@_hash['location'] = 'location'
|
74
|
+
@_hash['device'] = 'device'
|
52
75
|
@_hash
|
53
76
|
end
|
54
77
|
|
@@ -59,7 +82,12 @@ module MundiApi
|
|
59
82
|
customer_id = nil,
|
60
83
|
shipping = nil,
|
61
84
|
metadata = nil,
|
62
|
-
|
85
|
+
closed = true,
|
86
|
+
antifraud_enabled = nil,
|
87
|
+
ip = nil,
|
88
|
+
session_id = nil,
|
89
|
+
location = nil,
|
90
|
+
device = nil)
|
63
91
|
@items = items
|
64
92
|
@customer = customer
|
65
93
|
@payments = payments
|
@@ -67,7 +95,12 @@ module MundiApi
|
|
67
95
|
@customer_id = customer_id
|
68
96
|
@shipping = shipping
|
69
97
|
@metadata = metadata
|
98
|
+
@closed = closed
|
70
99
|
@antifraud_enabled = antifraud_enabled
|
100
|
+
@ip = ip
|
101
|
+
@session_id = session_id
|
102
|
+
@location = location
|
103
|
+
@device = device
|
71
104
|
end
|
72
105
|
|
73
106
|
# Creates an instance of the object from a hash.
|
@@ -98,7 +131,13 @@ module MundiApi
|
|
98
131
|
shipping = CreateShippingRequest.from_hash(hash['shipping']) if
|
99
132
|
hash['shipping']
|
100
133
|
metadata = hash['metadata']
|
134
|
+
closed = hash['closed'] ||= true
|
101
135
|
antifraud_enabled = hash['antifraud_enabled']
|
136
|
+
ip = hash['ip']
|
137
|
+
session_id = hash['session_id']
|
138
|
+
location = CreateLocationRequest.from_hash(hash['location']) if
|
139
|
+
hash['location']
|
140
|
+
device = CreateDeviceRequest.from_hash(hash['device']) if hash['device']
|
102
141
|
|
103
142
|
# Create object from extracted values.
|
104
143
|
CreateOrderRequest.new(items,
|
@@ -108,7 +147,12 @@ module MundiApi
|
|
108
147
|
customer_id,
|
109
148
|
shipping,
|
110
149
|
metadata,
|
111
|
-
|
150
|
+
closed,
|
151
|
+
antifraud_enabled,
|
152
|
+
ip,
|
153
|
+
session_id,
|
154
|
+
location,
|
155
|
+
device)
|
112
156
|
end
|
113
157
|
end
|
114
158
|
end
|
@@ -28,6 +28,18 @@ module MundiApi
|
|
28
28
|
# @return [Array<String, String>]
|
29
29
|
attr_accessor :metadata
|
30
30
|
|
31
|
+
# Splits
|
32
|
+
# @return [List of CreateSplitRequest]
|
33
|
+
attr_accessor :split
|
34
|
+
|
35
|
+
# Customer Id
|
36
|
+
# @return [String]
|
37
|
+
attr_accessor :customer_id
|
38
|
+
|
39
|
+
# Customer
|
40
|
+
# @return [CreateCustomerRequest]
|
41
|
+
attr_accessor :customer
|
42
|
+
|
31
43
|
# Settings for bank transfer payment
|
32
44
|
# @return [CreateBankTransferPaymentRequest]
|
33
45
|
attr_accessor :bank_transfer
|
@@ -46,19 +58,20 @@ module MundiApi
|
|
46
58
|
|
47
59
|
# A mapping from model property names to API property names.
|
48
60
|
def self.names
|
49
|
-
if @_hash.nil?
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
61
|
+
@_hash = {} if @_hash.nil?
|
62
|
+
@_hash['payment_method'] = 'payment_method'
|
63
|
+
@_hash['credit_card'] = 'credit_card'
|
64
|
+
@_hash['boleto'] = 'boleto'
|
65
|
+
@_hash['currency'] = 'currency'
|
66
|
+
@_hash['voucher'] = 'voucher'
|
67
|
+
@_hash['metadata'] = 'metadata'
|
68
|
+
@_hash['split'] = 'split'
|
69
|
+
@_hash['customer_id'] = 'customer_id'
|
70
|
+
@_hash['customer'] = 'customer'
|
71
|
+
@_hash['bank_transfer'] = 'bank_transfer'
|
72
|
+
@_hash['gateway_affiliation_id'] = 'gateway_affiliation_id'
|
73
|
+
@_hash['amount'] = 'amount'
|
74
|
+
@_hash['checkout'] = 'checkout'
|
62
75
|
@_hash
|
63
76
|
end
|
64
77
|
|
@@ -68,6 +81,9 @@ module MundiApi
|
|
68
81
|
currency = nil,
|
69
82
|
voucher = nil,
|
70
83
|
metadata = nil,
|
84
|
+
split = nil,
|
85
|
+
customer_id = nil,
|
86
|
+
customer = nil,
|
71
87
|
bank_transfer = nil,
|
72
88
|
gateway_affiliation_id = nil,
|
73
89
|
amount = nil,
|
@@ -78,6 +94,9 @@ module MundiApi
|
|
78
94
|
@currency = currency
|
79
95
|
@voucher = voucher
|
80
96
|
@metadata = metadata
|
97
|
+
@split = split
|
98
|
+
@customer_id = customer_id
|
99
|
+
@customer = customer
|
81
100
|
@bank_transfer = bank_transfer
|
82
101
|
@gateway_affiliation_id = gateway_affiliation_id
|
83
102
|
@amount = amount
|
@@ -98,6 +117,17 @@ module MundiApi
|
|
98
117
|
voucher = CreateVoucherPaymentRequest.from_hash(hash['voucher']) if
|
99
118
|
hash['voucher']
|
100
119
|
metadata = hash['metadata']
|
120
|
+
# Parameter is an array, so we need to iterate through it
|
121
|
+
split = nil
|
122
|
+
unless hash['split'].nil?
|
123
|
+
split = []
|
124
|
+
hash['split'].each do |structure|
|
125
|
+
split << (CreateSplitRequest.from_hash(structure) if structure)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
customer_id = hash['customer_id']
|
129
|
+
customer = CreateCustomerRequest.from_hash(hash['customer']) if
|
130
|
+
hash['customer']
|
101
131
|
bank_transfer = CreateBankTransferPaymentRequest.from_hash(hash['bank_transfer']) if
|
102
132
|
hash['bank_transfer']
|
103
133
|
gateway_affiliation_id = hash['gateway_affiliation_id']
|
@@ -112,6 +142,9 @@ module MundiApi
|
|
112
142
|
currency,
|
113
143
|
voucher,
|
114
144
|
metadata,
|
145
|
+
split,
|
146
|
+
customer_id,
|
147
|
+
customer,
|
115
148
|
bank_transfer,
|
116
149
|
gateway_affiliation_id,
|
117
150
|
amount,
|
@@ -18,12 +18,10 @@ module MundiApi
|
|
18
18
|
|
19
19
|
# A mapping from model property names to API property names.
|
20
20
|
def self.names
|
21
|
-
if @_hash.nil?
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
@_hash['area_code'] = 'area_code'
|
26
|
-
end
|
21
|
+
@_hash = {} if @_hash.nil?
|
22
|
+
@_hash['country_code'] = 'country_code'
|
23
|
+
@_hash['number'] = 'number'
|
24
|
+
@_hash['area_code'] = 'area_code'
|
27
25
|
@_hash
|
28
26
|
end
|
29
27
|
|
@@ -14,11 +14,9 @@ module MundiApi
|
|
14
14
|
|
15
15
|
# A mapping from model property names to API property names.
|
16
16
|
def self.names
|
17
|
-
if @_hash.nil?
|
18
|
-
|
19
|
-
|
20
|
-
@_hash['mobile_phone'] = 'mobile_phone'
|
21
|
-
end
|
17
|
+
@_hash = {} if @_hash.nil?
|
18
|
+
@_hash['home_phone'] = 'home_phone'
|
19
|
+
@_hash['mobile_phone'] = 'mobile_phone'
|
22
20
|
@_hash
|
23
21
|
end
|
24
22
|
|
@@ -30,15 +30,13 @@ module MundiApi
|
|
30
30
|
|
31
31
|
# A mapping from model property names to API property names.
|
32
32
|
def self.names
|
33
|
-
if @_hash.nil?
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
@_hash['quantity'] = 'quantity'
|
41
|
-
end
|
33
|
+
@_hash = {} if @_hash.nil?
|
34
|
+
@_hash['name'] = 'name'
|
35
|
+
@_hash['pricing_scheme'] = 'pricing_scheme'
|
36
|
+
@_hash['id'] = 'id'
|
37
|
+
@_hash['description'] = 'description'
|
38
|
+
@_hash['cycles'] = 'cycles'
|
39
|
+
@_hash['quantity'] = 'quantity'
|
42
40
|
@_hash
|
43
41
|
end
|
44
42
|
|
@@ -81,27 +81,25 @@ module MundiApi
|
|
81
81
|
|
82
82
|
# A mapping from model property names to API property names.
|
83
83
|
def self.names
|
84
|
-
if @_hash.nil?
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
@_hash['trial_period_days'] = 'trial_period_days'
|
104
|
-
end
|
84
|
+
@_hash = {} if @_hash.nil?
|
85
|
+
@_hash['name'] = 'name'
|
86
|
+
@_hash['description'] = 'description'
|
87
|
+
@_hash['statement_descriptor'] = 'statement_descriptor'
|
88
|
+
@_hash['items'] = 'items'
|
89
|
+
@_hash['shippable'] = 'shippable'
|
90
|
+
@_hash['payment_methods'] = 'payment_methods'
|
91
|
+
@_hash['installments'] = 'installments'
|
92
|
+
@_hash['currency'] = 'currency'
|
93
|
+
@_hash['interval'] = 'interval'
|
94
|
+
@_hash['interval_count'] = 'interval_count'
|
95
|
+
@_hash['billing_days'] = 'billing_days'
|
96
|
+
@_hash['billing_type'] = 'billing_type'
|
97
|
+
@_hash['pricing_scheme'] = 'pricing_scheme'
|
98
|
+
@_hash['metadata'] = 'metadata'
|
99
|
+
@_hash['minimum_price'] = 'minimum_price'
|
100
|
+
@_hash['cycles'] = 'cycles'
|
101
|
+
@_hash['quantity'] = 'quantity'
|
102
|
+
@_hash['trial_period_days'] = 'trial_period_days'
|
105
103
|
@_hash
|
106
104
|
end
|
107
105
|
|
@@ -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['overage_price'] = 'overage_price'
|
31
|
-
end
|
25
|
+
@_hash = {} if @_hash.nil?
|
26
|
+
@_hash['start_quantity'] = 'start_quantity'
|
27
|
+
@_hash['price'] = 'price'
|
28
|
+
@_hash['end_quantity'] = 'end_quantity'
|
29
|
+
@_hash['overage_price'] = 'overage_price'
|
32
30
|
@_hash
|
33
31
|
end
|
34
32
|
|
@@ -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['minimum_price'] = 'minimum_price'
|
31
|
-
end
|
25
|
+
@_hash = {} if @_hash.nil?
|
26
|
+
@_hash['scheme_type'] = 'scheme_type'
|
27
|
+
@_hash['price_brackets'] = 'price_brackets'
|
28
|
+
@_hash['price'] = 'price'
|
29
|
+
@_hash['minimum_price'] = 'minimum_price'
|
32
30
|
@_hash
|
33
31
|
end
|
34
32
|
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# This file was automatically generated by APIMATIC v2.0
|
2
|
+
# ( https://apimatic.io ).
|
3
|
+
|
4
|
+
module MundiApi
|
5
|
+
# Request for creating a recipient
|
6
|
+
class CreateRecipientRequest < BaseModel
|
7
|
+
# Recipient name
|
8
|
+
# @return [String]
|
9
|
+
attr_accessor :name
|
10
|
+
|
11
|
+
# Recipient email
|
12
|
+
# @return [String]
|
13
|
+
attr_accessor :email
|
14
|
+
|
15
|
+
# Recipient description
|
16
|
+
# @return [String]
|
17
|
+
attr_accessor :description
|
18
|
+
|
19
|
+
# Recipient document number
|
20
|
+
# @return [String]
|
21
|
+
attr_accessor :document
|
22
|
+
|
23
|
+
# Recipient type
|
24
|
+
# @return [String]
|
25
|
+
attr_accessor :type
|
26
|
+
|
27
|
+
# Bank account
|
28
|
+
# @return [CreateBankAccountRequest]
|
29
|
+
attr_accessor :default_bank_account
|
30
|
+
|
31
|
+
# Metadata
|
32
|
+
# @return [Array<String, String>]
|
33
|
+
attr_accessor :metadata
|
34
|
+
|
35
|
+
# A mapping from model property names to API property names.
|
36
|
+
def self.names
|
37
|
+
@_hash = {} if @_hash.nil?
|
38
|
+
@_hash['name'] = 'name'
|
39
|
+
@_hash['email'] = 'email'
|
40
|
+
@_hash['description'] = 'description'
|
41
|
+
@_hash['document'] = 'document'
|
42
|
+
@_hash['type'] = 'type'
|
43
|
+
@_hash['default_bank_account'] = 'default_bank_account'
|
44
|
+
@_hash['metadata'] = 'metadata'
|
45
|
+
@_hash
|
46
|
+
end
|
47
|
+
|
48
|
+
def initialize(name = nil,
|
49
|
+
email = nil,
|
50
|
+
description = nil,
|
51
|
+
document = nil,
|
52
|
+
type = nil,
|
53
|
+
default_bank_account = nil,
|
54
|
+
metadata = nil)
|
55
|
+
@name = name
|
56
|
+
@email = email
|
57
|
+
@description = description
|
58
|
+
@document = document
|
59
|
+
@type = type
|
60
|
+
@default_bank_account = default_bank_account
|
61
|
+
@metadata = metadata
|
62
|
+
end
|
63
|
+
|
64
|
+
# Creates an instance of the object from a hash.
|
65
|
+
def self.from_hash(hash)
|
66
|
+
return nil unless hash
|
67
|
+
|
68
|
+
# Extract variables from the hash.
|
69
|
+
name = hash['name']
|
70
|
+
email = hash['email']
|
71
|
+
description = hash['description']
|
72
|
+
document = hash['document']
|
73
|
+
type = hash['type']
|
74
|
+
default_bank_account = CreateBankAccountRequest.from_hash(hash['default_bank_account']) if
|
75
|
+
hash['default_bank_account']
|
76
|
+
metadata = hash['metadata']
|
77
|
+
|
78
|
+
# Create object from extracted values.
|
79
|
+
CreateRecipientRequest.new(name,
|
80
|
+
email,
|
81
|
+
description,
|
82
|
+
document,
|
83
|
+
type,
|
84
|
+
default_bank_account,
|
85
|
+
metadata)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -8,6 +8,10 @@ module MundiApi
|
|
8
8
|
# @return [String]
|
9
9
|
attr_accessor :name
|
10
10
|
|
11
|
+
# Metadata
|
12
|
+
# @return [Array<String, String>]
|
13
|
+
attr_accessor :metadata
|
14
|
+
|
11
15
|
# Seller's code identification
|
12
16
|
# @return [String]
|
13
17
|
attr_accessor :code
|
@@ -21,46 +25,40 @@ module MundiApi
|
|
21
25
|
attr_accessor :document
|
22
26
|
|
23
27
|
# Address
|
24
|
-
# @return [
|
28
|
+
# @return [CreateAddressRequest]
|
25
29
|
attr_accessor :address
|
26
30
|
|
27
31
|
# Person type (individual / company)
|
28
32
|
# @return [String]
|
29
33
|
attr_accessor :type
|
30
34
|
|
31
|
-
# Metadata
|
32
|
-
# @return [CreateCardRequest]
|
33
|
-
attr_accessor :metadata
|
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['metadata'] = 'metadata'
|
46
|
-
end
|
37
|
+
@_hash = {} if @_hash.nil?
|
38
|
+
@_hash['name'] = 'name'
|
39
|
+
@_hash['metadata'] = 'metadata'
|
40
|
+
@_hash['code'] = 'code'
|
41
|
+
@_hash['description'] = 'description'
|
42
|
+
@_hash['document'] = 'document'
|
43
|
+
@_hash['address'] = 'address'
|
44
|
+
@_hash['type'] = 'type'
|
47
45
|
@_hash
|
48
46
|
end
|
49
47
|
|
50
48
|
def initialize(name = nil,
|
49
|
+
metadata = nil,
|
51
50
|
code = nil,
|
52
51
|
description = nil,
|
53
52
|
document = nil,
|
54
53
|
address = nil,
|
55
|
-
type = nil
|
56
|
-
metadata = nil)
|
54
|
+
type = nil)
|
57
55
|
@name = name
|
56
|
+
@metadata = metadata
|
58
57
|
@code = code
|
59
58
|
@description = description
|
60
59
|
@document = document
|
61
60
|
@address = address
|
62
61
|
@type = type
|
63
|
-
@metadata = metadata
|
64
62
|
end
|
65
63
|
|
66
64
|
# Creates an instance of the object from a hash.
|
@@ -69,22 +67,22 @@ module MundiApi
|
|
69
67
|
|
70
68
|
# Extract variables from the hash.
|
71
69
|
name = hash['name']
|
70
|
+
metadata = hash['metadata']
|
72
71
|
code = hash['code']
|
73
72
|
description = hash['description']
|
74
73
|
document = hash['document']
|
75
|
-
address = hash['address']
|
74
|
+
address = CreateAddressRequest.from_hash(hash['address']) if
|
75
|
+
hash['address']
|
76
76
|
type = hash['type']
|
77
|
-
metadata = CreateCardRequest.from_hash(hash['metadata']) if
|
78
|
-
hash['metadata']
|
79
77
|
|
80
78
|
# Create object from extracted values.
|
81
79
|
CreateSellerRequest.new(name,
|
80
|
+
metadata,
|
82
81
|
code,
|
83
82
|
description,
|
84
83
|
document,
|
85
84
|
address,
|
86
|
-
type
|
87
|
-
metadata)
|
85
|
+
type)
|
88
86
|
end
|
89
87
|
end
|
90
88
|
end
|