mundi_api 0.9.1 → 0.13.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1755 -698
- data/lib/mundi_api.rb +75 -35
- data/lib/mundi_api/api_helper.rb +59 -7
- data/lib/mundi_api/controllers/charges_controller.rb +136 -97
- data/lib/mundi_api/controllers/customers_controller.rb +264 -253
- data/lib/mundi_api/controllers/invoices_controller.rb +97 -23
- data/lib/mundi_api/controllers/orders_controller.rb +247 -30
- data/lib/mundi_api/controllers/plans_controller.rb +108 -106
- data/lib/mundi_api/controllers/recipients_controller.rb +571 -0
- data/lib/mundi_api/controllers/sellers_controller.rb +244 -0
- data/lib/mundi_api/controllers/subscriptions_controller.rb +298 -108
- data/lib/mundi_api/models/create_access_token_request.rb +7 -9
- data/lib/mundi_api/models/create_address_request.rb +30 -14
- data/lib/mundi_api/models/create_anticipation_request.rb +53 -0
- data/lib/mundi_api/models/create_bank_account_request.rb +114 -0
- data/lib/mundi_api/models/create_bank_transfer_payment_request.rb +3 -5
- data/lib/mundi_api/models/create_boleto_payment_request.rb +18 -11
- data/lib/mundi_api/models/create_cancel_charge_request.rb +2 -4
- data/lib/mundi_api/models/create_cancel_subscription_request.rb +2 -4
- data/lib/mundi_api/models/create_capture_charge_request.rb +3 -5
- data/lib/mundi_api/models/create_card_options_request.rb +2 -4
- data/lib/mundi_api/models/create_card_request.rb +24 -17
- data/lib/mundi_api/models/create_card_token_request.rb +7 -9
- data/lib/mundi_api/models/create_charge_request.rb +8 -10
- data/lib/mundi_api/models/create_checkout_boleto_payment_request.rb +4 -6
- data/lib/mundi_api/models/create_checkout_card_installment_option_request.rb +3 -5
- data/lib/mundi_api/models/create_checkout_card_payment_request.rb +3 -5
- data/lib/mundi_api/models/create_checkout_payment_request.rb +55 -11
- data/lib/mundi_api/models/create_credit_card_payment_request.rb +28 -12
- data/lib/mundi_api/models/create_customer_request.rb +10 -12
- data/lib/mundi_api/models/create_device_request.rb +33 -0
- data/lib/mundi_api/models/create_discount_request.rb +5 -7
- data/lib/mundi_api/models/create_location_request.rb +42 -0
- data/lib/mundi_api/models/create_order_item_request.rb +15 -8
- data/lib/mundi_api/models/create_order_request.rb +57 -13
- data/lib/mundi_api/models/create_payment_request.rb +46 -13
- data/lib/mundi_api/models/create_phone_request.rb +4 -6
- data/lib/mundi_api/models/create_phones_request.rb +3 -5
- data/lib/mundi_api/models/create_plan_item_request.rb +7 -9
- data/lib/mundi_api/models/create_plan_request.rb +19 -21
- data/lib/mundi_api/models/create_price_bracket_request.rb +5 -7
- data/lib/mundi_api/models/create_pricing_scheme_request.rb +5 -7
- data/lib/mundi_api/models/create_recipient_request.rb +88 -0
- data/lib/mundi_api/models/create_seller_request.rb +21 -23
- data/lib/mundi_api/models/create_setup_request.rb +4 -6
- data/lib/mundi_api/models/create_shipping_request.rb +7 -9
- data/lib/mundi_api/models/create_split_request.rb +51 -0
- data/lib/mundi_api/models/create_subscription_item_request.rb +18 -11
- data/lib/mundi_api/models/create_subscription_request.rb +46 -30
- data/lib/mundi_api/models/create_token_request.rb +3 -5
- data/lib/mundi_api/models/create_transfer_request.rb +42 -0
- data/lib/mundi_api/models/create_usage_request.rb +4 -6
- data/lib/mundi_api/models/create_voucher_payment_request.rb +6 -8
- data/lib/mundi_api/models/get_access_token_response.rb +6 -8
- data/lib/mundi_api/models/get_address_response.rb +35 -19
- data/lib/mundi_api/models/get_anticipation_limit_response.rb +42 -0
- data/lib/mundi_api/models/get_anticipation_limits_response.rb +42 -0
- data/lib/mundi_api/models/get_anticipation_response.rb +117 -0
- data/lib/mundi_api/models/get_balance_response.rb +52 -0
- data/lib/mundi_api/models/get_bank_account_response.rb +161 -0
- data/lib/mundi_api/models/get_bank_transfer_transaction_response.rb +22 -9
- data/lib/mundi_api/models/get_billing_address_response.rb +29 -13
- data/lib/mundi_api/models/get_boleto_transaction_response.rb +96 -11
- data/lib/mundi_api/models/get_card_response.rb +16 -18
- data/lib/mundi_api/models/get_card_token_response.rb +8 -10
- data/lib/mundi_api/models/get_charge_response.rb +18 -20
- data/lib/mundi_api/models/get_checkout_boleto_payment_response.rb +43 -0
- data/lib/mundi_api/models/get_checkout_card_installment_options_response.rb +42 -0
- data/lib/mundi_api/models/get_checkout_card_payment_response.rb +49 -0
- data/lib/mundi_api/models/get_checkout_payment_response.rb +238 -0
- data/lib/mundi_api/models/get_checkout_payment_settings_response.rb +9 -11
- data/lib/mundi_api/models/get_credit_card_transaction_response.rb +36 -14
- data/lib/mundi_api/models/get_customer_response.rb +24 -17
- data/lib/mundi_api/models/get_device_response.rb +33 -0
- data/lib/mundi_api/models/get_discount_response.rb +9 -11
- data/lib/mundi_api/models/get_gateway_recipient_response.rb +69 -0
- data/lib/mundi_api/models/get_invoice_item_response.rb +27 -11
- data/lib/mundi_api/models/get_invoice_response.rb +29 -22
- data/lib/mundi_api/models/get_location_response.rb +42 -0
- data/lib/mundi_api/models/get_order_item_response.rb +28 -12
- data/lib/mundi_api/models/get_order_response.rb +64 -20
- data/lib/mundi_api/models/get_period_response.rb +6 -8
- data/lib/mundi_api/models/get_phone_response.rb +4 -6
- data/lib/mundi_api/models/get_phones_response.rb +3 -5
- data/lib/mundi_api/models/get_plan_item_response.rb +12 -14
- data/lib/mundi_api/models/get_plan_response.rb +22 -24
- data/lib/mundi_api/models/get_price_bracket_response.rb +5 -7
- data/lib/mundi_api/models/get_pricing_scheme_response.rb +5 -7
- data/lib/mundi_api/models/get_recipient_response.rb +150 -0
- data/lib/mundi_api/models/get_safety_pay_transaction_response.rb +21 -8
- data/lib/mundi_api/models/get_seller_response.rb +13 -15
- data/lib/mundi_api/models/get_sellers_request.rb +87 -0
- data/lib/mundi_api/models/get_setup_response.rb +5 -7
- data/lib/mundi_api/models/get_shipping_response.rb +6 -8
- data/lib/mundi_api/models/get_split_response.rb +52 -0
- data/lib/mundi_api/models/get_subscription_item_response.rb +24 -17
- data/lib/mundi_api/models/get_subscription_response.rb +44 -37
- data/lib/mundi_api/models/get_token_response.rb +6 -8
- data/lib/mundi_api/models/get_transaction_response.rb +37 -14
- data/lib/mundi_api/models/get_transfer_response.rb +89 -0
- data/lib/mundi_api/models/get_usage_response.rb +27 -11
- data/lib/mundi_api/models/get_voucher_transaction_response.rb +27 -14
- data/lib/mundi_api/models/list_access_tokens_response.rb +3 -5
- data/lib/mundi_api/models/list_addresses_response.rb +3 -5
- data/lib/mundi_api/models/list_anticipation_response.rb +49 -0
- data/lib/mundi_api/models/list_cards_response.rb +3 -5
- data/lib/mundi_api/models/list_charges_response.rb +3 -5
- data/lib/mundi_api/models/list_customers_response.rb +3 -5
- data/lib/mundi_api/models/list_invoices_response.rb +3 -5
- data/lib/mundi_api/models/list_order_response.rb +3 -5
- data/lib/mundi_api/models/list_plans_response.rb +3 -5
- data/lib/mundi_api/models/list_recipient_response.rb +49 -0
- data/lib/mundi_api/models/list_seller_response.rb +49 -0
- data/lib/mundi_api/models/list_subscription_items_response.rb +3 -5
- data/lib/mundi_api/models/list_subscriptions_response.rb +3 -5
- data/lib/mundi_api/models/list_transactions_response.rb +3 -5
- data/lib/mundi_api/models/list_transfer_response.rb +49 -0
- data/lib/mundi_api/models/list_usages_response.rb +3 -5
- data/lib/mundi_api/models/paging_response.rb +4 -6
- data/lib/mundi_api/models/update_address_request.rb +15 -8
- data/lib/mundi_api/models/update_card_request.rb +7 -9
- data/lib/mundi_api/models/update_charge_card_request.rb +5 -7
- data/lib/mundi_api/models/update_charge_due_date_request.rb +2 -4
- data/lib/mundi_api/models/update_charge_payment_method_request.rb +6 -8
- data/lib/mundi_api/models/update_customer_request.rb +23 -16
- data/lib/mundi_api/models/update_invoice_status_request.rb +33 -0
- data/lib/mundi_api/models/update_metadata_request.rb +2 -4
- data/lib/mundi_api/models/update_order_item_request.rb +60 -0
- data/lib/mundi_api/models/update_order_status_request.rb +33 -0
- data/lib/mundi_api/models/update_plan_item_request.rb +7 -9
- data/lib/mundi_api/models/update_plan_request.rb +16 -18
- data/lib/mundi_api/models/update_price_bracket_request.rb +5 -7
- data/lib/mundi_api/models/update_pricing_scheme_request.rb +5 -7
- data/lib/mundi_api/models/update_recipient_bank_account_request.rb +34 -0
- data/lib/mundi_api/models/update_recipient_request.rb +78 -0
- data/lib/mundi_api/models/update_seller_request.rb +97 -0
- data/lib/mundi_api/models/update_subscription_affiliation_id_request.rb +33 -0
- data/lib/mundi_api/models/update_subscription_billing_date_request.rb +2 -4
- data/lib/mundi_api/models/update_subscription_card_request.rb +3 -5
- data/lib/mundi_api/models/update_subscription_item_request.rb +16 -9
- data/lib/mundi_api/models/update_subscription_payment_method_request.rb +4 -6
- data/lib/mundi_api/mundi_api_client.rb +32 -20
- metadata +39 -3
@@ -0,0 +1,89 @@
|
|
1
|
+
# This file was automatically generated by APIMATIC v2.0
|
2
|
+
# ( https://apimatic.io ).
|
3
|
+
|
4
|
+
require 'date'
|
5
|
+
module MundiApi
|
6
|
+
# Transfer response
|
7
|
+
class GetTransferResponse < BaseModel
|
8
|
+
# Id
|
9
|
+
# @return [String]
|
10
|
+
attr_accessor :id
|
11
|
+
|
12
|
+
# Transfer amount
|
13
|
+
# @return [Integer]
|
14
|
+
attr_accessor :amount
|
15
|
+
|
16
|
+
# Transfer status
|
17
|
+
# @return [String]
|
18
|
+
attr_accessor :status
|
19
|
+
|
20
|
+
# Transfer creation date
|
21
|
+
# @return [DateTime]
|
22
|
+
attr_accessor :created_at
|
23
|
+
|
24
|
+
# Transfer last update date
|
25
|
+
# @return [DateTime]
|
26
|
+
attr_accessor :updated_at
|
27
|
+
|
28
|
+
# Bank account
|
29
|
+
# @return [GetBankAccountResponse]
|
30
|
+
attr_accessor :bank_account
|
31
|
+
|
32
|
+
# Metadata
|
33
|
+
# @return [Array<String, String>]
|
34
|
+
attr_accessor :metadata
|
35
|
+
|
36
|
+
# A mapping from model property names to API property names.
|
37
|
+
def self.names
|
38
|
+
@_hash = {} if @_hash.nil?
|
39
|
+
@_hash['id'] = 'id'
|
40
|
+
@_hash['amount'] = 'amount'
|
41
|
+
@_hash['status'] = 'status'
|
42
|
+
@_hash['created_at'] = 'created_at'
|
43
|
+
@_hash['updated_at'] = 'updated_at'
|
44
|
+
@_hash['bank_account'] = 'bank_account'
|
45
|
+
@_hash['metadata'] = 'metadata'
|
46
|
+
@_hash
|
47
|
+
end
|
48
|
+
|
49
|
+
def initialize(id = nil,
|
50
|
+
amount = nil,
|
51
|
+
status = nil,
|
52
|
+
created_at = nil,
|
53
|
+
updated_at = nil,
|
54
|
+
bank_account = nil,
|
55
|
+
metadata = nil)
|
56
|
+
@id = id
|
57
|
+
@amount = amount
|
58
|
+
@status = status
|
59
|
+
@created_at = created_at
|
60
|
+
@updated_at = updated_at
|
61
|
+
@bank_account = bank_account
|
62
|
+
@metadata = metadata
|
63
|
+
end
|
64
|
+
|
65
|
+
# Creates an instance of the object from a hash.
|
66
|
+
def self.from_hash(hash)
|
67
|
+
return nil unless hash
|
68
|
+
|
69
|
+
# Extract variables from the hash.
|
70
|
+
id = hash['id']
|
71
|
+
amount = hash['amount']
|
72
|
+
status = hash['status']
|
73
|
+
created_at = DateTime.rfc3339(hash['created_at']) if hash['created_at']
|
74
|
+
updated_at = DateTime.rfc3339(hash['updated_at']) if hash['updated_at']
|
75
|
+
bank_account = GetBankAccountResponse.from_hash(hash['bank_account']) if
|
76
|
+
hash['bank_account']
|
77
|
+
metadata = hash['metadata']
|
78
|
+
|
79
|
+
# Create object from extracted values.
|
80
|
+
GetTransferResponse.new(id,
|
81
|
+
amount,
|
82
|
+
status,
|
83
|
+
created_at,
|
84
|
+
updated_at,
|
85
|
+
bank_account,
|
86
|
+
metadata)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -25,21 +25,29 @@ module MundiApi
|
|
25
25
|
# @return [DateTime]
|
26
26
|
attr_accessor :created_at
|
27
27
|
|
28
|
+
# Status
|
29
|
+
# @return [String]
|
30
|
+
attr_accessor :status
|
31
|
+
|
28
32
|
# Subscription item
|
29
33
|
# @return [GetSubscriptionItemResponse]
|
30
34
|
attr_accessor :subscription_item
|
31
35
|
|
36
|
+
# Subscription item
|
37
|
+
# @return [DateTime]
|
38
|
+
attr_accessor :deleted_at
|
39
|
+
|
32
40
|
# A mapping from model property names to API property names.
|
33
41
|
def self.names
|
34
|
-
if @_hash.nil?
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
42
|
+
@_hash = {} if @_hash.nil?
|
43
|
+
@_hash['id'] = 'id'
|
44
|
+
@_hash['quantity'] = 'quantity'
|
45
|
+
@_hash['description'] = 'description'
|
46
|
+
@_hash['used_at'] = 'used_at'
|
47
|
+
@_hash['created_at'] = 'created_at'
|
48
|
+
@_hash['status'] = 'status'
|
49
|
+
@_hash['subscription_item'] = 'subscription_item'
|
50
|
+
@_hash['deleted_at'] = 'deleted_at'
|
43
51
|
@_hash
|
44
52
|
end
|
45
53
|
|
@@ -48,13 +56,17 @@ module MundiApi
|
|
48
56
|
description = nil,
|
49
57
|
used_at = nil,
|
50
58
|
created_at = nil,
|
51
|
-
|
59
|
+
status = nil,
|
60
|
+
subscription_item = nil,
|
61
|
+
deleted_at = nil)
|
52
62
|
@id = id
|
53
63
|
@quantity = quantity
|
54
64
|
@description = description
|
55
65
|
@used_at = used_at
|
56
66
|
@created_at = created_at
|
67
|
+
@status = status
|
57
68
|
@subscription_item = subscription_item
|
69
|
+
@deleted_at = deleted_at
|
58
70
|
end
|
59
71
|
|
60
72
|
# Creates an instance of the object from a hash.
|
@@ -67,8 +79,10 @@ module MundiApi
|
|
67
79
|
description = hash['description']
|
68
80
|
used_at = DateTime.rfc3339(hash['used_at']) if hash['used_at']
|
69
81
|
created_at = DateTime.rfc3339(hash['created_at']) if hash['created_at']
|
82
|
+
status = hash['status']
|
70
83
|
subscription_item = GetSubscriptionItemResponse.from_hash(hash['subscription_item']) if
|
71
84
|
hash['subscription_item']
|
85
|
+
deleted_at = DateTime.rfc3339(hash['deleted_at']) if hash['deleted_at']
|
72
86
|
|
73
87
|
# Create object from extracted values.
|
74
88
|
GetUsageResponse.new(id,
|
@@ -76,7 +90,9 @@ module MundiApi
|
|
76
90
|
description,
|
77
91
|
used_at,
|
78
92
|
created_at,
|
79
|
-
|
93
|
+
status,
|
94
|
+
subscription_item,
|
95
|
+
deleted_at)
|
80
96
|
end
|
81
97
|
end
|
82
98
|
end
|
@@ -49,20 +49,18 @@ module MundiApi
|
|
49
49
|
|
50
50
|
# A mapping from model property names to API property names.
|
51
51
|
def self.names
|
52
|
-
if @_hash.nil?
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
@_hash = super().merge(@_hash)
|
65
|
-
end
|
52
|
+
@_hash = {} if @_hash.nil?
|
53
|
+
@_hash['statement_descriptor'] = 'statement_descriptor'
|
54
|
+
@_hash['acquirer_name'] = 'acquirer_name'
|
55
|
+
@_hash['acquirer_affiliation_code'] = 'acquirer_affiliation_code'
|
56
|
+
@_hash['acquirer_tid'] = 'acquirer_tid'
|
57
|
+
@_hash['acquirer_nsu'] = 'acquirer_nsu'
|
58
|
+
@_hash['acquirer_auth_code'] = 'acquirer_auth_code'
|
59
|
+
@_hash['acquirer_message'] = 'acquirer_message'
|
60
|
+
@_hash['acquirer_return_code'] = 'acquirer_return_code'
|
61
|
+
@_hash['operation_type'] = 'operation_type'
|
62
|
+
@_hash['card'] = 'card'
|
63
|
+
@_hash = super().merge(@_hash)
|
66
64
|
@_hash
|
67
65
|
end
|
68
66
|
|
@@ -84,6 +82,8 @@ module MundiApi
|
|
84
82
|
updated_at = nil,
|
85
83
|
attempt_count = nil,
|
86
84
|
max_attempts = nil,
|
85
|
+
splits = nil,
|
86
|
+
id = nil,
|
87
87
|
next_attempt = nil,
|
88
88
|
transaction_type = nil)
|
89
89
|
@statement_descriptor = statement_descriptor
|
@@ -106,6 +106,8 @@ module MundiApi
|
|
106
106
|
updated_at,
|
107
107
|
attempt_count,
|
108
108
|
max_attempts,
|
109
|
+
splits,
|
110
|
+
id,
|
109
111
|
next_attempt,
|
110
112
|
transaction_type)
|
111
113
|
end
|
@@ -133,6 +135,15 @@ module MundiApi
|
|
133
135
|
updated_at = DateTime.rfc3339(hash['updated_at']) if hash['updated_at']
|
134
136
|
attempt_count = hash['attempt_count']
|
135
137
|
max_attempts = hash['max_attempts']
|
138
|
+
# Parameter is an array, so we need to iterate through it
|
139
|
+
splits = nil
|
140
|
+
unless hash['splits'].nil?
|
141
|
+
splits = []
|
142
|
+
hash['splits'].each do |structure|
|
143
|
+
splits << (GetSplitResponse.from_hash(structure) if structure)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
id = hash['id']
|
136
147
|
next_attempt = DateTime.rfc3339(hash['next_attempt']) if
|
137
148
|
hash['next_attempt']
|
138
149
|
transaction_type = hash['transaction_type']
|
@@ -156,6 +167,8 @@ module MundiApi
|
|
156
167
|
updated_at,
|
157
168
|
attempt_count,
|
158
169
|
max_attempts,
|
170
|
+
splits,
|
171
|
+
id,
|
159
172
|
next_attempt,
|
160
173
|
transaction_type)
|
161
174
|
end
|
@@ -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['paging'] = 'paging'
|
21
|
-
end
|
17
|
+
@_hash = {} if @_hash.nil?
|
18
|
+
@_hash['data'] = 'data'
|
19
|
+
@_hash['paging'] = 'paging'
|
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['paging'] = 'paging'
|
21
|
-
end
|
17
|
+
@_hash = {} if @_hash.nil?
|
18
|
+
@_hash['data'] = 'data'
|
19
|
+
@_hash['paging'] = 'paging'
|
22
20
|
@_hash
|
23
21
|
end
|
24
22
|
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# This file was automatically generated by APIMATIC v2.0
|
2
|
+
# ( https://apimatic.io ).
|
3
|
+
|
4
|
+
module MundiApi
|
5
|
+
# Anticipations
|
6
|
+
class ListAnticipationResponse < BaseModel
|
7
|
+
# Anticipations
|
8
|
+
# @return [List of GetAnticipationResponse]
|
9
|
+
attr_accessor :data
|
10
|
+
|
11
|
+
# Paging
|
12
|
+
# @return [PagingResponse]
|
13
|
+
attr_accessor :paging
|
14
|
+
|
15
|
+
# A mapping from model property names to API property names.
|
16
|
+
def self.names
|
17
|
+
@_hash = {} if @_hash.nil?
|
18
|
+
@_hash['data'] = 'data'
|
19
|
+
@_hash['paging'] = 'paging'
|
20
|
+
@_hash
|
21
|
+
end
|
22
|
+
|
23
|
+
def initialize(data = nil,
|
24
|
+
paging = nil)
|
25
|
+
@data = data
|
26
|
+
@paging = paging
|
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
|
+
# Parameter is an array, so we need to iterate through it
|
35
|
+
data = nil
|
36
|
+
unless hash['data'].nil?
|
37
|
+
data = []
|
38
|
+
hash['data'].each do |structure|
|
39
|
+
data << (GetAnticipationResponse.from_hash(structure) if structure)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
paging = PagingResponse.from_hash(hash['paging']) if hash['paging']
|
43
|
+
|
44
|
+
# Create object from extracted values.
|
45
|
+
ListAnticipationResponse.new(data,
|
46
|
+
paging)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -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['paging'] = 'paging'
|
21
|
-
end
|
17
|
+
@_hash = {} if @_hash.nil?
|
18
|
+
@_hash['data'] = 'data'
|
19
|
+
@_hash['paging'] = 'paging'
|
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['paging'] = 'paging'
|
21
|
-
end
|
17
|
+
@_hash = {} if @_hash.nil?
|
18
|
+
@_hash['data'] = 'data'
|
19
|
+
@_hash['paging'] = 'paging'
|
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['paging'] = 'paging'
|
21
|
-
end
|
17
|
+
@_hash = {} if @_hash.nil?
|
18
|
+
@_hash['data'] = 'data'
|
19
|
+
@_hash['paging'] = 'paging'
|
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['paging'] = 'paging'
|
21
|
-
end
|
17
|
+
@_hash = {} if @_hash.nil?
|
18
|
+
@_hash['data'] = 'data'
|
19
|
+
@_hash['paging'] = 'paging'
|
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['paging'] = 'paging'
|
21
|
-
end
|
17
|
+
@_hash = {} if @_hash.nil?
|
18
|
+
@_hash['data'] = 'data'
|
19
|
+
@_hash['paging'] = 'paging'
|
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['paging'] = 'paging'
|
21
|
-
end
|
17
|
+
@_hash = {} if @_hash.nil?
|
18
|
+
@_hash['data'] = 'data'
|
19
|
+
@_hash['paging'] = 'paging'
|
22
20
|
@_hash
|
23
21
|
end
|
24
22
|
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# This file was automatically generated by APIMATIC v2.0
|
2
|
+
# ( https://apimatic.io ).
|
3
|
+
|
4
|
+
module MundiApi
|
5
|
+
# Response for the listing recipient method
|
6
|
+
class ListRecipientResponse < BaseModel
|
7
|
+
# Recipients
|
8
|
+
# @return [List of GetRecipientResponse]
|
9
|
+
attr_accessor :data
|
10
|
+
|
11
|
+
# Paging
|
12
|
+
# @return [PagingResponse]
|
13
|
+
attr_accessor :paging
|
14
|
+
|
15
|
+
# A mapping from model property names to API property names.
|
16
|
+
def self.names
|
17
|
+
@_hash = {} if @_hash.nil?
|
18
|
+
@_hash['data'] = 'data'
|
19
|
+
@_hash['paging'] = 'paging'
|
20
|
+
@_hash
|
21
|
+
end
|
22
|
+
|
23
|
+
def initialize(data = nil,
|
24
|
+
paging = nil)
|
25
|
+
@data = data
|
26
|
+
@paging = paging
|
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
|
+
# Parameter is an array, so we need to iterate through it
|
35
|
+
data = nil
|
36
|
+
unless hash['data'].nil?
|
37
|
+
data = []
|
38
|
+
hash['data'].each do |structure|
|
39
|
+
data << (GetRecipientResponse.from_hash(structure) if structure)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
paging = PagingResponse.from_hash(hash['paging']) if hash['paging']
|
43
|
+
|
44
|
+
# Create object from extracted values.
|
45
|
+
ListRecipientResponse.new(data,
|
46
|
+
paging)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|