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
@@ -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['brand'] = 'brand'
|
41
|
-
end
|
33
|
+
@_hash = {} if @_hash.nil?
|
34
|
+
@_hash['number'] = 'number'
|
35
|
+
@_hash['holder_name'] = 'holder_name'
|
36
|
+
@_hash['exp_month'] = 'exp_month'
|
37
|
+
@_hash['exp_year'] = 'exp_year'
|
38
|
+
@_hash['cvv'] = 'cvv'
|
39
|
+
@_hash['brand'] = 'brand'
|
42
40
|
@_hash
|
43
41
|
end
|
44
42
|
|
@@ -35,16 +35,14 @@ module MundiApi
|
|
35
35
|
|
36
36
|
# A mapping from model property names to API property names.
|
37
37
|
def self.names
|
38
|
-
if @_hash.nil?
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
@_hash['due_at'] = 'due_at'
|
47
|
-
end
|
38
|
+
@_hash = {} if @_hash.nil?
|
39
|
+
@_hash['code'] = 'code'
|
40
|
+
@_hash['amount'] = 'amount'
|
41
|
+
@_hash['customer_id'] = 'customer_id'
|
42
|
+
@_hash['customer'] = 'customer'
|
43
|
+
@_hash['payment'] = 'payment'
|
44
|
+
@_hash['metadata'] = 'metadata'
|
45
|
+
@_hash['due_at'] = 'due_at'
|
48
46
|
@_hash
|
49
47
|
end
|
50
48
|
|
@@ -19,12 +19,10 @@ module MundiApi
|
|
19
19
|
|
20
20
|
# A mapping from model property names to API property names.
|
21
21
|
def self.names
|
22
|
-
if @_hash.nil?
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
@_hash['due_at'] = 'due_at'
|
27
|
-
end
|
22
|
+
@_hash = {} if @_hash.nil?
|
23
|
+
@_hash['bank'] = 'bank'
|
24
|
+
@_hash['instructions'] = 'instructions'
|
25
|
+
@_hash['due_at'] = 'due_at'
|
28
26
|
@_hash
|
29
27
|
end
|
30
28
|
|
@@ -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['total'] = 'total'
|
21
|
-
end
|
17
|
+
@_hash = {} if @_hash.nil?
|
18
|
+
@_hash['number'] = 'number'
|
19
|
+
@_hash['total'] = 'total'
|
22
20
|
@_hash
|
23
21
|
end
|
24
22
|
|
@@ -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['installments'] = 'installments'
|
21
|
-
end
|
17
|
+
@_hash = {} if @_hash.nil?
|
18
|
+
@_hash['statement_descriptor'] = 'statement_descriptor'
|
19
|
+
@_hash['installments'] = 'installments'
|
22
20
|
@_hash
|
23
21
|
end
|
24
22
|
|
@@ -12,6 +12,18 @@ module MundiApi
|
|
12
12
|
# @return [String]
|
13
13
|
attr_accessor :success_url
|
14
14
|
|
15
|
+
# Pular tela de sucesso pós-pagamento?
|
16
|
+
# @return [Boolean]
|
17
|
+
attr_accessor :skip_checkout_success_page
|
18
|
+
|
19
|
+
# Torna o objeto billing address editável
|
20
|
+
# @return [Boolean]
|
21
|
+
attr_accessor :billing_address_editable
|
22
|
+
|
23
|
+
# Endereço de cobrança
|
24
|
+
# @return [CreateAddressRequest]
|
25
|
+
attr_accessor :billing_address
|
26
|
+
|
15
27
|
# Default payment method
|
16
28
|
# @return [String]
|
17
29
|
attr_accessor :default_payment_method
|
@@ -28,32 +40,53 @@ module MundiApi
|
|
28
40
|
# @return [CreateCheckoutBoletoPaymentRequest]
|
29
41
|
attr_accessor :boleto
|
30
42
|
|
43
|
+
# Torna o objeto editável
|
44
|
+
# @return [Boolean]
|
45
|
+
attr_accessor :customer_editable
|
46
|
+
|
47
|
+
# Tempo em minutos para a expiração
|
48
|
+
# @return [Integer]
|
49
|
+
attr_accessor :expires_in
|
50
|
+
|
31
51
|
# A mapping from model property names to API property names.
|
32
52
|
def self.names
|
33
|
-
if @_hash.nil?
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
53
|
+
@_hash = {} if @_hash.nil?
|
54
|
+
@_hash['accepted_payment_methods'] = 'accepted_payment_methods'
|
55
|
+
@_hash['success_url'] = 'success_url'
|
56
|
+
@_hash['skip_checkout_success_page'] = 'skip_checkout_success_page'
|
57
|
+
@_hash['billing_address_editable'] = 'billing_address_editable'
|
58
|
+
@_hash['billing_address'] = 'billing_address'
|
59
|
+
@_hash['default_payment_method'] = 'default_payment_method'
|
60
|
+
@_hash['gateway_affiliation_id'] = 'gateway_affiliation_id'
|
61
|
+
@_hash['credit_card'] = 'credit_card'
|
62
|
+
@_hash['boleto'] = 'boleto'
|
63
|
+
@_hash['customer_editable'] = 'customer_editable'
|
64
|
+
@_hash['expires_in'] = 'expires_in'
|
42
65
|
@_hash
|
43
66
|
end
|
44
67
|
|
45
68
|
def initialize(accepted_payment_methods = nil,
|
46
69
|
success_url = nil,
|
70
|
+
skip_checkout_success_page = nil,
|
71
|
+
billing_address_editable = nil,
|
72
|
+
billing_address = nil,
|
47
73
|
default_payment_method = nil,
|
48
74
|
gateway_affiliation_id = nil,
|
49
75
|
credit_card = nil,
|
50
|
-
boleto = nil
|
76
|
+
boleto = nil,
|
77
|
+
customer_editable = nil,
|
78
|
+
expires_in = nil)
|
51
79
|
@accepted_payment_methods = accepted_payment_methods
|
52
80
|
@success_url = success_url
|
81
|
+
@skip_checkout_success_page = skip_checkout_success_page
|
82
|
+
@billing_address_editable = billing_address_editable
|
83
|
+
@billing_address = billing_address
|
53
84
|
@default_payment_method = default_payment_method
|
54
85
|
@gateway_affiliation_id = gateway_affiliation_id
|
55
86
|
@credit_card = credit_card
|
56
87
|
@boleto = boleto
|
88
|
+
@customer_editable = customer_editable
|
89
|
+
@expires_in = expires_in
|
57
90
|
end
|
58
91
|
|
59
92
|
# Creates an instance of the object from a hash.
|
@@ -63,20 +96,31 @@ module MundiApi
|
|
63
96
|
# Extract variables from the hash.
|
64
97
|
accepted_payment_methods = hash['accepted_payment_methods']
|
65
98
|
success_url = hash['success_url']
|
99
|
+
skip_checkout_success_page = hash['skip_checkout_success_page']
|
100
|
+
billing_address_editable = hash['billing_address_editable']
|
101
|
+
billing_address = CreateAddressRequest.from_hash(hash['billing_address']) if
|
102
|
+
hash['billing_address']
|
66
103
|
default_payment_method = hash['default_payment_method']
|
67
104
|
gateway_affiliation_id = hash['gateway_affiliation_id']
|
68
105
|
credit_card = CreateCheckoutCardPaymentRequest.from_hash(hash['credit_card']) if
|
69
106
|
hash['credit_card']
|
70
107
|
boleto = CreateCheckoutBoletoPaymentRequest.from_hash(hash['boleto']) if
|
71
108
|
hash['boleto']
|
109
|
+
customer_editable = hash['customer_editable']
|
110
|
+
expires_in = hash['expires_in']
|
72
111
|
|
73
112
|
# Create object from extracted values.
|
74
113
|
CreateCheckoutPaymentRequest.new(accepted_payment_methods,
|
75
114
|
success_url,
|
115
|
+
skip_checkout_success_page,
|
116
|
+
billing_address_editable,
|
117
|
+
billing_address,
|
76
118
|
default_payment_method,
|
77
119
|
gateway_affiliation_id,
|
78
120
|
credit_card,
|
79
|
-
boleto
|
121
|
+
boleto,
|
122
|
+
customer_editable,
|
123
|
+
expires_in)
|
80
124
|
end
|
81
125
|
end
|
82
126
|
end
|
@@ -36,6 +36,14 @@ module MundiApi
|
|
36
36
|
# @return [Boolean]
|
37
37
|
attr_accessor :recurrence
|
38
38
|
|
39
|
+
# Indicates whether the extended label (private label) is enabled
|
40
|
+
# @return [Boolean]
|
41
|
+
attr_accessor :extended_limit_enabled
|
42
|
+
|
43
|
+
# Extended Limit Code
|
44
|
+
# @return [String]
|
45
|
+
attr_accessor :extended_limit_code
|
46
|
+
|
39
47
|
# Indicates if the operation should be only authorization or auth and
|
40
48
|
# capture.
|
41
49
|
# @return [Boolean]
|
@@ -43,18 +51,18 @@ module MundiApi
|
|
43
51
|
|
44
52
|
# A mapping from model property names to API property names.
|
45
53
|
def self.names
|
46
|
-
if @_hash.nil?
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
54
|
+
@_hash = {} if @_hash.nil?
|
55
|
+
@_hash['installments'] = 'installments'
|
56
|
+
@_hash['statement_descriptor'] = 'statement_descriptor'
|
57
|
+
@_hash['card'] = 'card'
|
58
|
+
@_hash['retries'] = 'retries'
|
59
|
+
@_hash['update_subscription_card'] = 'update_subscription_card'
|
60
|
+
@_hash['card_id'] = 'card_id'
|
61
|
+
@_hash['card_token'] = 'card_token'
|
62
|
+
@_hash['recurrence'] = 'recurrence'
|
63
|
+
@_hash['extended_limit_enabled'] = 'extended_limit_enabled'
|
64
|
+
@_hash['extended_limit_code'] = 'extended_limit_code'
|
65
|
+
@_hash['capture'] = 'capture'
|
58
66
|
@_hash
|
59
67
|
end
|
60
68
|
|
@@ -66,6 +74,8 @@ module MundiApi
|
|
66
74
|
card_id = nil,
|
67
75
|
card_token = nil,
|
68
76
|
recurrence = nil,
|
77
|
+
extended_limit_enabled = nil,
|
78
|
+
extended_limit_code = nil,
|
69
79
|
capture = true)
|
70
80
|
@installments = installments
|
71
81
|
@statement_descriptor = statement_descriptor
|
@@ -75,6 +85,8 @@ module MundiApi
|
|
75
85
|
@card_id = card_id
|
76
86
|
@card_token = card_token
|
77
87
|
@recurrence = recurrence
|
88
|
+
@extended_limit_enabled = extended_limit_enabled
|
89
|
+
@extended_limit_code = extended_limit_code
|
78
90
|
@capture = capture
|
79
91
|
end
|
80
92
|
|
@@ -91,6 +103,8 @@ module MundiApi
|
|
91
103
|
card_id = hash['card_id']
|
92
104
|
card_token = hash['card_token']
|
93
105
|
recurrence = hash['recurrence']
|
106
|
+
extended_limit_enabled = hash['extended_limit_enabled']
|
107
|
+
extended_limit_code = hash['extended_limit_code']
|
94
108
|
capture = hash['capture'] ||= true
|
95
109
|
|
96
110
|
# Create object from extracted values.
|
@@ -102,6 +116,8 @@ module MundiApi
|
|
102
116
|
card_id,
|
103
117
|
card_token,
|
104
118
|
recurrence,
|
119
|
+
extended_limit_enabled,
|
120
|
+
extended_limit_code,
|
105
121
|
capture)
|
106
122
|
end
|
107
123
|
end
|
@@ -42,18 +42,16 @@ module MundiApi
|
|
42
42
|
|
43
43
|
# A mapping from model property names to API property names.
|
44
44
|
def self.names
|
45
|
-
if @_hash.nil?
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
@_hash['gender'] = 'gender'
|
56
|
-
end
|
45
|
+
@_hash = {} if @_hash.nil?
|
46
|
+
@_hash['name'] = 'name'
|
47
|
+
@_hash['email'] = 'email'
|
48
|
+
@_hash['document'] = 'document'
|
49
|
+
@_hash['type'] = 'type'
|
50
|
+
@_hash['address'] = 'address'
|
51
|
+
@_hash['metadata'] = 'metadata'
|
52
|
+
@_hash['phones'] = 'phones'
|
53
|
+
@_hash['code'] = 'code'
|
54
|
+
@_hash['gender'] = 'gender'
|
57
55
|
@_hash
|
58
56
|
end
|
59
57
|
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# This file was automatically generated by APIMATIC v2.0
|
2
|
+
# ( https://apimatic.io ).
|
3
|
+
|
4
|
+
module MundiApi
|
5
|
+
# Request for creating a device
|
6
|
+
class CreateDeviceRequest < BaseModel
|
7
|
+
# Device's platform
|
8
|
+
# @return [String]
|
9
|
+
attr_accessor :platform
|
10
|
+
|
11
|
+
# A mapping from model property names to API property names.
|
12
|
+
def self.names
|
13
|
+
@_hash = {} if @_hash.nil?
|
14
|
+
@_hash['platform'] = 'platform'
|
15
|
+
@_hash
|
16
|
+
end
|
17
|
+
|
18
|
+
def initialize(platform = nil)
|
19
|
+
@platform = platform
|
20
|
+
end
|
21
|
+
|
22
|
+
# Creates an instance of the object from a hash.
|
23
|
+
def self.from_hash(hash)
|
24
|
+
return nil unless hash
|
25
|
+
|
26
|
+
# Extract variables from the hash.
|
27
|
+
platform = hash['platform']
|
28
|
+
|
29
|
+
# Create object from extracted values.
|
30
|
+
CreateDeviceRequest.new(platform)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -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['cycles'] = 'cycles'
|
31
|
-
end
|
25
|
+
@_hash = {} if @_hash.nil?
|
26
|
+
@_hash['value'] = 'value'
|
27
|
+
@_hash['discount_type'] = 'discount_type'
|
28
|
+
@_hash['item_id'] = 'item_id'
|
29
|
+
@_hash['cycles'] = 'cycles'
|
32
30
|
@_hash
|
33
31
|
end
|
34
32
|
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# This file was automatically generated by APIMATIC v2.0
|
2
|
+
# ( https://apimatic.io ).
|
3
|
+
|
4
|
+
module MundiApi
|
5
|
+
# Request for creating a location
|
6
|
+
class CreateLocationRequest < BaseModel
|
7
|
+
# Latitude
|
8
|
+
# @return [String]
|
9
|
+
attr_accessor :latitude
|
10
|
+
|
11
|
+
# Longitude
|
12
|
+
# @return [String]
|
13
|
+
attr_accessor :longitude
|
14
|
+
|
15
|
+
# A mapping from model property names to API property names.
|
16
|
+
def self.names
|
17
|
+
@_hash = {} if @_hash.nil?
|
18
|
+
@_hash['latitude'] = 'latitude'
|
19
|
+
@_hash['longitude'] = 'longitude'
|
20
|
+
@_hash
|
21
|
+
end
|
22
|
+
|
23
|
+
def initialize(latitude = nil,
|
24
|
+
longitude = nil)
|
25
|
+
@latitude = latitude
|
26
|
+
@longitude = longitude
|
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
|
+
latitude = hash['latitude']
|
35
|
+
longitude = hash['longitude']
|
36
|
+
|
37
|
+
# Create object from extracted values.
|
38
|
+
CreateLocationRequest.new(latitude,
|
39
|
+
longitude)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -16,6 +16,10 @@ module MundiApi
|
|
16
16
|
# @return [Integer]
|
17
17
|
attr_accessor :quantity
|
18
18
|
|
19
|
+
# Category
|
20
|
+
# @return [String]
|
21
|
+
attr_accessor :category
|
22
|
+
|
19
23
|
# Item seller
|
20
24
|
# @return [CreateSellerRequest]
|
21
25
|
attr_accessor :seller
|
@@ -26,25 +30,26 @@ module MundiApi
|
|
26
30
|
|
27
31
|
# A mapping from model property names to API property names.
|
28
32
|
def self.names
|
29
|
-
if @_hash.nil?
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
end
|
33
|
+
@_hash = {} if @_hash.nil?
|
34
|
+
@_hash['amount'] = 'amount'
|
35
|
+
@_hash['description'] = 'description'
|
36
|
+
@_hash['quantity'] = 'quantity'
|
37
|
+
@_hash['category'] = 'category'
|
38
|
+
@_hash['seller'] = 'seller'
|
39
|
+
@_hash['seller_id'] = 'seller_id'
|
37
40
|
@_hash
|
38
41
|
end
|
39
42
|
|
40
43
|
def initialize(amount = nil,
|
41
44
|
description = nil,
|
42
45
|
quantity = nil,
|
46
|
+
category = nil,
|
43
47
|
seller = nil,
|
44
48
|
seller_id = nil)
|
45
49
|
@amount = amount
|
46
50
|
@description = description
|
47
51
|
@quantity = quantity
|
52
|
+
@category = category
|
48
53
|
@seller = seller
|
49
54
|
@seller_id = seller_id
|
50
55
|
end
|
@@ -57,6 +62,7 @@ module MundiApi
|
|
57
62
|
amount = hash['amount']
|
58
63
|
description = hash['description']
|
59
64
|
quantity = hash['quantity']
|
65
|
+
category = hash['category']
|
60
66
|
seller = CreateSellerRequest.from_hash(hash['seller']) if hash['seller']
|
61
67
|
seller_id = hash['seller_id']
|
62
68
|
|
@@ -64,6 +70,7 @@ module MundiApi
|
|
64
70
|
CreateOrderItemRequest.new(amount,
|
65
71
|
description,
|
66
72
|
quantity,
|
73
|
+
category,
|
67
74
|
seller,
|
68
75
|
seller_id)
|
69
76
|
end
|