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.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1755 -698
  3. data/lib/mundi_api.rb +75 -35
  4. data/lib/mundi_api/api_helper.rb +59 -7
  5. data/lib/mundi_api/controllers/charges_controller.rb +136 -97
  6. data/lib/mundi_api/controllers/customers_controller.rb +264 -253
  7. data/lib/mundi_api/controllers/invoices_controller.rb +97 -23
  8. data/lib/mundi_api/controllers/orders_controller.rb +247 -30
  9. data/lib/mundi_api/controllers/plans_controller.rb +108 -106
  10. data/lib/mundi_api/controllers/recipients_controller.rb +571 -0
  11. data/lib/mundi_api/controllers/sellers_controller.rb +244 -0
  12. data/lib/mundi_api/controllers/subscriptions_controller.rb +298 -108
  13. data/lib/mundi_api/models/create_access_token_request.rb +7 -9
  14. data/lib/mundi_api/models/create_address_request.rb +30 -14
  15. data/lib/mundi_api/models/create_anticipation_request.rb +53 -0
  16. data/lib/mundi_api/models/create_bank_account_request.rb +114 -0
  17. data/lib/mundi_api/models/create_bank_transfer_payment_request.rb +3 -5
  18. data/lib/mundi_api/models/create_boleto_payment_request.rb +18 -11
  19. data/lib/mundi_api/models/create_cancel_charge_request.rb +2 -4
  20. data/lib/mundi_api/models/create_cancel_subscription_request.rb +2 -4
  21. data/lib/mundi_api/models/create_capture_charge_request.rb +3 -5
  22. data/lib/mundi_api/models/create_card_options_request.rb +2 -4
  23. data/lib/mundi_api/models/create_card_request.rb +24 -17
  24. data/lib/mundi_api/models/create_card_token_request.rb +7 -9
  25. data/lib/mundi_api/models/create_charge_request.rb +8 -10
  26. data/lib/mundi_api/models/create_checkout_boleto_payment_request.rb +4 -6
  27. data/lib/mundi_api/models/create_checkout_card_installment_option_request.rb +3 -5
  28. data/lib/mundi_api/models/create_checkout_card_payment_request.rb +3 -5
  29. data/lib/mundi_api/models/create_checkout_payment_request.rb +55 -11
  30. data/lib/mundi_api/models/create_credit_card_payment_request.rb +28 -12
  31. data/lib/mundi_api/models/create_customer_request.rb +10 -12
  32. data/lib/mundi_api/models/create_device_request.rb +33 -0
  33. data/lib/mundi_api/models/create_discount_request.rb +5 -7
  34. data/lib/mundi_api/models/create_location_request.rb +42 -0
  35. data/lib/mundi_api/models/create_order_item_request.rb +15 -8
  36. data/lib/mundi_api/models/create_order_request.rb +57 -13
  37. data/lib/mundi_api/models/create_payment_request.rb +46 -13
  38. data/lib/mundi_api/models/create_phone_request.rb +4 -6
  39. data/lib/mundi_api/models/create_phones_request.rb +3 -5
  40. data/lib/mundi_api/models/create_plan_item_request.rb +7 -9
  41. data/lib/mundi_api/models/create_plan_request.rb +19 -21
  42. data/lib/mundi_api/models/create_price_bracket_request.rb +5 -7
  43. data/lib/mundi_api/models/create_pricing_scheme_request.rb +5 -7
  44. data/lib/mundi_api/models/create_recipient_request.rb +88 -0
  45. data/lib/mundi_api/models/create_seller_request.rb +21 -23
  46. data/lib/mundi_api/models/create_setup_request.rb +4 -6
  47. data/lib/mundi_api/models/create_shipping_request.rb +7 -9
  48. data/lib/mundi_api/models/create_split_request.rb +51 -0
  49. data/lib/mundi_api/models/create_subscription_item_request.rb +18 -11
  50. data/lib/mundi_api/models/create_subscription_request.rb +46 -30
  51. data/lib/mundi_api/models/create_token_request.rb +3 -5
  52. data/lib/mundi_api/models/create_transfer_request.rb +42 -0
  53. data/lib/mundi_api/models/create_usage_request.rb +4 -6
  54. data/lib/mundi_api/models/create_voucher_payment_request.rb +6 -8
  55. data/lib/mundi_api/models/get_access_token_response.rb +6 -8
  56. data/lib/mundi_api/models/get_address_response.rb +35 -19
  57. data/lib/mundi_api/models/get_anticipation_limit_response.rb +42 -0
  58. data/lib/mundi_api/models/get_anticipation_limits_response.rb +42 -0
  59. data/lib/mundi_api/models/get_anticipation_response.rb +117 -0
  60. data/lib/mundi_api/models/get_balance_response.rb +52 -0
  61. data/lib/mundi_api/models/get_bank_account_response.rb +161 -0
  62. data/lib/mundi_api/models/get_bank_transfer_transaction_response.rb +22 -9
  63. data/lib/mundi_api/models/get_billing_address_response.rb +29 -13
  64. data/lib/mundi_api/models/get_boleto_transaction_response.rb +96 -11
  65. data/lib/mundi_api/models/get_card_response.rb +16 -18
  66. data/lib/mundi_api/models/get_card_token_response.rb +8 -10
  67. data/lib/mundi_api/models/get_charge_response.rb +18 -20
  68. data/lib/mundi_api/models/get_checkout_boleto_payment_response.rb +43 -0
  69. data/lib/mundi_api/models/get_checkout_card_installment_options_response.rb +42 -0
  70. data/lib/mundi_api/models/get_checkout_card_payment_response.rb +49 -0
  71. data/lib/mundi_api/models/get_checkout_payment_response.rb +238 -0
  72. data/lib/mundi_api/models/get_checkout_payment_settings_response.rb +9 -11
  73. data/lib/mundi_api/models/get_credit_card_transaction_response.rb +36 -14
  74. data/lib/mundi_api/models/get_customer_response.rb +24 -17
  75. data/lib/mundi_api/models/get_device_response.rb +33 -0
  76. data/lib/mundi_api/models/get_discount_response.rb +9 -11
  77. data/lib/mundi_api/models/get_gateway_recipient_response.rb +69 -0
  78. data/lib/mundi_api/models/get_invoice_item_response.rb +27 -11
  79. data/lib/mundi_api/models/get_invoice_response.rb +29 -22
  80. data/lib/mundi_api/models/get_location_response.rb +42 -0
  81. data/lib/mundi_api/models/get_order_item_response.rb +28 -12
  82. data/lib/mundi_api/models/get_order_response.rb +64 -20
  83. data/lib/mundi_api/models/get_period_response.rb +6 -8
  84. data/lib/mundi_api/models/get_phone_response.rb +4 -6
  85. data/lib/mundi_api/models/get_phones_response.rb +3 -5
  86. data/lib/mundi_api/models/get_plan_item_response.rb +12 -14
  87. data/lib/mundi_api/models/get_plan_response.rb +22 -24
  88. data/lib/mundi_api/models/get_price_bracket_response.rb +5 -7
  89. data/lib/mundi_api/models/get_pricing_scheme_response.rb +5 -7
  90. data/lib/mundi_api/models/get_recipient_response.rb +150 -0
  91. data/lib/mundi_api/models/get_safety_pay_transaction_response.rb +21 -8
  92. data/lib/mundi_api/models/get_seller_response.rb +13 -15
  93. data/lib/mundi_api/models/get_sellers_request.rb +87 -0
  94. data/lib/mundi_api/models/get_setup_response.rb +5 -7
  95. data/lib/mundi_api/models/get_shipping_response.rb +6 -8
  96. data/lib/mundi_api/models/get_split_response.rb +52 -0
  97. data/lib/mundi_api/models/get_subscription_item_response.rb +24 -17
  98. data/lib/mundi_api/models/get_subscription_response.rb +44 -37
  99. data/lib/mundi_api/models/get_token_response.rb +6 -8
  100. data/lib/mundi_api/models/get_transaction_response.rb +37 -14
  101. data/lib/mundi_api/models/get_transfer_response.rb +89 -0
  102. data/lib/mundi_api/models/get_usage_response.rb +27 -11
  103. data/lib/mundi_api/models/get_voucher_transaction_response.rb +27 -14
  104. data/lib/mundi_api/models/list_access_tokens_response.rb +3 -5
  105. data/lib/mundi_api/models/list_addresses_response.rb +3 -5
  106. data/lib/mundi_api/models/list_anticipation_response.rb +49 -0
  107. data/lib/mundi_api/models/list_cards_response.rb +3 -5
  108. data/lib/mundi_api/models/list_charges_response.rb +3 -5
  109. data/lib/mundi_api/models/list_customers_response.rb +3 -5
  110. data/lib/mundi_api/models/list_invoices_response.rb +3 -5
  111. data/lib/mundi_api/models/list_order_response.rb +3 -5
  112. data/lib/mundi_api/models/list_plans_response.rb +3 -5
  113. data/lib/mundi_api/models/list_recipient_response.rb +49 -0
  114. data/lib/mundi_api/models/list_seller_response.rb +49 -0
  115. data/lib/mundi_api/models/list_subscription_items_response.rb +3 -5
  116. data/lib/mundi_api/models/list_subscriptions_response.rb +3 -5
  117. data/lib/mundi_api/models/list_transactions_response.rb +3 -5
  118. data/lib/mundi_api/models/list_transfer_response.rb +49 -0
  119. data/lib/mundi_api/models/list_usages_response.rb +3 -5
  120. data/lib/mundi_api/models/paging_response.rb +4 -6
  121. data/lib/mundi_api/models/update_address_request.rb +15 -8
  122. data/lib/mundi_api/models/update_card_request.rb +7 -9
  123. data/lib/mundi_api/models/update_charge_card_request.rb +5 -7
  124. data/lib/mundi_api/models/update_charge_due_date_request.rb +2 -4
  125. data/lib/mundi_api/models/update_charge_payment_method_request.rb +6 -8
  126. data/lib/mundi_api/models/update_customer_request.rb +23 -16
  127. data/lib/mundi_api/models/update_invoice_status_request.rb +33 -0
  128. data/lib/mundi_api/models/update_metadata_request.rb +2 -4
  129. data/lib/mundi_api/models/update_order_item_request.rb +60 -0
  130. data/lib/mundi_api/models/update_order_status_request.rb +33 -0
  131. data/lib/mundi_api/models/update_plan_item_request.rb +7 -9
  132. data/lib/mundi_api/models/update_plan_request.rb +16 -18
  133. data/lib/mundi_api/models/update_price_bracket_request.rb +5 -7
  134. data/lib/mundi_api/models/update_pricing_scheme_request.rb +5 -7
  135. data/lib/mundi_api/models/update_recipient_bank_account_request.rb +34 -0
  136. data/lib/mundi_api/models/update_recipient_request.rb +78 -0
  137. data/lib/mundi_api/models/update_seller_request.rb +97 -0
  138. data/lib/mundi_api/models/update_subscription_affiliation_id_request.rb +33 -0
  139. data/lib/mundi_api/models/update_subscription_billing_date_request.rb +2 -4
  140. data/lib/mundi_api/models/update_subscription_card_request.rb +3 -5
  141. data/lib/mundi_api/models/update_subscription_item_request.rb +16 -9
  142. data/lib/mundi_api/models/update_subscription_payment_method_request.rb +4 -6
  143. data/lib/mundi_api/mundi_api_client.rb +32 -20
  144. metadata +39 -3
@@ -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
- @_hash = {}
24
- @_hash['amount'] = 'amount'
25
- @_hash['description'] = 'description'
26
- @_hash['payment'] = 'payment'
27
- end
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['amount'] = 'amount'
24
+ @_hash['description'] = 'description'
25
+ @_hash['payment'] = 'payment'
28
26
  @_hash
29
27
  end
30
28
 
@@ -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
- @_hash = {}
35
- @_hash['amount'] = 'amount'
36
- @_hash['description'] = 'description'
37
- @_hash['recipient_name'] = 'recipient_name'
38
- @_hash['recipient_phone'] = 'recipient_phone'
39
- @_hash['address_id'] = 'address_id'
40
- @_hash['address'] = 'address'
41
- end
33
+ @_hash = {} if @_hash.nil?
34
+ @_hash['amount'] = 'amount'
35
+ @_hash['description'] = 'description'
36
+ @_hash['recipient_name'] = 'recipient_name'
37
+ @_hash['recipient_phone'] = 'recipient_phone'
38
+ @_hash['address_id'] = 'address_id'
39
+ @_hash['address'] = 'address'
42
40
  @_hash
43
41
  end
44
42
 
@@ -0,0 +1,51 @@
1
+ # This file was automatically generated by APIMATIC v2.0
2
+ # ( https://apimatic.io ).
3
+
4
+ module MundiApi
5
+ # Split
6
+ class CreateSplitRequest < BaseModel
7
+ # Split type
8
+ # @return [String]
9
+ attr_accessor :type
10
+
11
+ # Amount
12
+ # @return [Integer]
13
+ attr_accessor :amount
14
+
15
+ # Recipient id
16
+ # @return [String]
17
+ attr_accessor :recipient_id
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_id'] = 'recipient_id'
25
+ @_hash
26
+ end
27
+
28
+ def initialize(type = nil,
29
+ amount = nil,
30
+ recipient_id = nil)
31
+ @type = type
32
+ @amount = amount
33
+ @recipient_id = recipient_id
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_id = hash['recipient_id']
44
+
45
+ # Create object from extracted values.
46
+ CreateSplitRequest.new(type,
47
+ amount,
48
+ recipient_id)
49
+ end
50
+ end
51
+ end
@@ -24,6 +24,10 @@ module MundiApi
24
24
  # @return [List of CreateDiscountRequest]
25
25
  attr_accessor :discounts
26
26
 
27
+ # Item name
28
+ # @return [String]
29
+ attr_accessor :name
30
+
27
31
  # Number of cycles which the item will be charged
28
32
  # @return [Integer]
29
33
  attr_accessor :cycles
@@ -38,17 +42,16 @@ module MundiApi
38
42
 
39
43
  # A mapping from model property names to API property names.
40
44
  def self.names
41
- if @_hash.nil?
42
- @_hash = {}
43
- @_hash['description'] = 'description'
44
- @_hash['pricing_scheme'] = 'pricing_scheme'
45
- @_hash['id'] = 'id'
46
- @_hash['plan_item_id'] = 'plan_item_id'
47
- @_hash['discounts'] = 'discounts'
48
- @_hash['cycles'] = 'cycles'
49
- @_hash['quantity'] = 'quantity'
50
- @_hash['minimum_price'] = 'minimum_price'
51
- end
45
+ @_hash = {} if @_hash.nil?
46
+ @_hash['description'] = 'description'
47
+ @_hash['pricing_scheme'] = 'pricing_scheme'
48
+ @_hash['id'] = 'id'
49
+ @_hash['plan_item_id'] = 'plan_item_id'
50
+ @_hash['discounts'] = 'discounts'
51
+ @_hash['name'] = 'name'
52
+ @_hash['cycles'] = 'cycles'
53
+ @_hash['quantity'] = 'quantity'
54
+ @_hash['minimum_price'] = 'minimum_price'
52
55
  @_hash
53
56
  end
54
57
 
@@ -57,6 +60,7 @@ module MundiApi
57
60
  id = nil,
58
61
  plan_item_id = nil,
59
62
  discounts = nil,
63
+ name = nil,
60
64
  cycles = nil,
61
65
  quantity = nil,
62
66
  minimum_price = nil)
@@ -65,6 +69,7 @@ module MundiApi
65
69
  @id = id
66
70
  @plan_item_id = plan_item_id
67
71
  @discounts = discounts
72
+ @name = name
68
73
  @cycles = cycles
69
74
  @quantity = quantity
70
75
  @minimum_price = minimum_price
@@ -88,6 +93,7 @@ module MundiApi
88
93
  discounts << (CreateDiscountRequest.from_hash(structure) if structure)
89
94
  end
90
95
  end
96
+ name = hash['name']
91
97
  cycles = hash['cycles']
92
98
  quantity = hash['quantity']
93
99
  minimum_price = hash['minimum_price']
@@ -98,6 +104,7 @@ module MundiApi
98
104
  id,
99
105
  plan_item_id,
100
106
  discounts,
107
+ name,
101
108
  cycles,
102
109
  quantity,
103
110
  minimum_price)
@@ -105,36 +105,44 @@ module MundiApi
105
105
  # @return [String]
106
106
  attr_accessor :card_token
107
107
 
108
+ # Gateway Affiliation code
109
+ # @return [String]
110
+ attr_accessor :gateway_affiliation_id
111
+
112
+ # Quantity
113
+ # @return [Integer]
114
+ attr_accessor :quantity
115
+
108
116
  # A mapping from model property names to API property names.
109
117
  def self.names
110
- if @_hash.nil?
111
- @_hash = {}
112
- @_hash['customer'] = 'customer'
113
- @_hash['card'] = 'card'
114
- @_hash['code'] = 'code'
115
- @_hash['payment_method'] = 'payment_method'
116
- @_hash['billing_type'] = 'billing_type'
117
- @_hash['statement_descriptor'] = 'statement_descriptor'
118
- @_hash['description'] = 'description'
119
- @_hash['currency'] = 'currency'
120
- @_hash['interval'] = 'interval'
121
- @_hash['interval_count'] = 'interval_count'
122
- @_hash['pricing_scheme'] = 'pricing_scheme'
123
- @_hash['items'] = 'items'
124
- @_hash['shipping'] = 'shipping'
125
- @_hash['discounts'] = 'discounts'
126
- @_hash['metadata'] = 'metadata'
127
- @_hash['setup'] = 'setup'
128
- @_hash['plan_id'] = 'plan_id'
129
- @_hash['customer_id'] = 'customer_id'
130
- @_hash['card_id'] = 'card_id'
131
- @_hash['billing_day'] = 'billing_day'
132
- @_hash['installments'] = 'installments'
133
- @_hash['start_at'] = 'start_at'
134
- @_hash['minimum_price'] = 'minimum_price'
135
- @_hash['cycles'] = 'cycles'
136
- @_hash['card_token'] = 'card_token'
137
- end
118
+ @_hash = {} if @_hash.nil?
119
+ @_hash['customer'] = 'customer'
120
+ @_hash['card'] = 'card'
121
+ @_hash['code'] = 'code'
122
+ @_hash['payment_method'] = 'payment_method'
123
+ @_hash['billing_type'] = 'billing_type'
124
+ @_hash['statement_descriptor'] = 'statement_descriptor'
125
+ @_hash['description'] = 'description'
126
+ @_hash['currency'] = 'currency'
127
+ @_hash['interval'] = 'interval'
128
+ @_hash['interval_count'] = 'interval_count'
129
+ @_hash['pricing_scheme'] = 'pricing_scheme'
130
+ @_hash['items'] = 'items'
131
+ @_hash['shipping'] = 'shipping'
132
+ @_hash['discounts'] = 'discounts'
133
+ @_hash['metadata'] = 'metadata'
134
+ @_hash['setup'] = 'setup'
135
+ @_hash['plan_id'] = 'plan_id'
136
+ @_hash['customer_id'] = 'customer_id'
137
+ @_hash['card_id'] = 'card_id'
138
+ @_hash['billing_day'] = 'billing_day'
139
+ @_hash['installments'] = 'installments'
140
+ @_hash['start_at'] = 'start_at'
141
+ @_hash['minimum_price'] = 'minimum_price'
142
+ @_hash['cycles'] = 'cycles'
143
+ @_hash['card_token'] = 'card_token'
144
+ @_hash['gateway_affiliation_id'] = 'gateway_affiliation_id'
145
+ @_hash['quantity'] = 'quantity'
138
146
  @_hash
139
147
  end
140
148
 
@@ -162,7 +170,9 @@ module MundiApi
162
170
  start_at = nil,
163
171
  minimum_price = nil,
164
172
  cycles = nil,
165
- card_token = nil)
173
+ card_token = nil,
174
+ gateway_affiliation_id = nil,
175
+ quantity = nil)
166
176
  @customer = customer
167
177
  @card = card
168
178
  @code = code
@@ -188,6 +198,8 @@ module MundiApi
188
198
  @minimum_price = minimum_price
189
199
  @cycles = cycles
190
200
  @card_token = card_token
201
+ @gateway_affiliation_id = gateway_affiliation_id
202
+ @quantity = quantity
191
203
  end
192
204
 
193
205
  # Creates an instance of the object from a hash.
@@ -237,6 +249,8 @@ module MundiApi
237
249
  minimum_price = hash['minimum_price']
238
250
  cycles = hash['cycles']
239
251
  card_token = hash['card_token']
252
+ gateway_affiliation_id = hash['gateway_affiliation_id']
253
+ quantity = hash['quantity']
240
254
 
241
255
  # Create object from extracted values.
242
256
  CreateSubscriptionRequest.new(customer,
@@ -263,7 +277,9 @@ module MundiApi
263
277
  start_at,
264
278
  minimum_price,
265
279
  cycles,
266
- card_token)
280
+ card_token,
281
+ gateway_affiliation_id,
282
+ quantity)
267
283
  end
268
284
  end
269
285
  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
- @_hash = {}
19
- @_hash['type'] = 'type'
20
- @_hash['card'] = 'card'
21
- end
17
+ @_hash = {} if @_hash.nil?
18
+ @_hash['type'] = 'type'
19
+ @_hash['card'] = 'card'
22
20
  @_hash
23
21
  end
24
22
 
@@ -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 transfer
6
+ class CreateTransferRequest < BaseModel
7
+ # Transfer amount
8
+ # @return [Integer]
9
+ attr_accessor :amount
10
+
11
+ # Metadata
12
+ # @return [Array<String, String>]
13
+ attr_accessor :metadata
14
+
15
+ # A mapping from model property names to API property names.
16
+ def self.names
17
+ @_hash = {} if @_hash.nil?
18
+ @_hash['amount'] = 'amount'
19
+ @_hash['metadata'] = 'metadata'
20
+ @_hash
21
+ end
22
+
23
+ def initialize(amount = nil,
24
+ metadata = nil)
25
+ @amount = amount
26
+ @metadata = metadata
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
+ amount = hash['amount']
35
+ metadata = hash['metadata']
36
+
37
+ # Create object from extracted values.
38
+ CreateTransferRequest.new(amount,
39
+ metadata)
40
+ end
41
+ end
42
+ end
@@ -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
- @_hash = {}
24
- @_hash['quantity'] = 'quantity'
25
- @_hash['description'] = 'description'
26
- @_hash['used_at'] = 'used_at'
27
- end
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['quantity'] = 'quantity'
24
+ @_hash['description'] = 'description'
25
+ @_hash['used_at'] = 'used_at'
28
26
  @_hash
29
27
  end
30
28
 
@@ -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
- @_hash = {}
32
- @_hash['capture'] = 'capture'
33
- @_hash['statement_descriptor'] = 'statement_descriptor'
34
- @_hash['card_id'] = 'card_id'
35
- @_hash['card_token'] = 'card_token'
36
- @_hash['card'] = 'Card'
37
- end
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['capture'] = 'capture'
32
+ @_hash['statement_descriptor'] = 'statement_descriptor'
33
+ @_hash['card_id'] = 'card_id'
34
+ @_hash['card_token'] = 'card_token'
35
+ @_hash['card'] = 'Card'
38
36
  @_hash
39
37
  end
40
38
 
@@ -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
- @_hash = {}
32
- @_hash['id'] = 'id'
33
- @_hash['code'] = 'code'
34
- @_hash['status'] = 'status'
35
- @_hash['created_at'] = 'created_at'
36
- @_hash['customer'] = 'customer'
37
- end
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['id'] = 'id'
32
+ @_hash['code'] = 'code'
33
+ @_hash['status'] = 'status'
34
+ @_hash['created_at'] = 'created_at'
35
+ @_hash['customer'] = 'customer'
38
36
  @_hash
39
37
  end
40
38
 
@@ -61,30 +61,38 @@ module MundiApi
61
61
  # @return [Array<String, String>]
62
62
  attr_accessor :metadata
63
63
 
64
- # TODO: Write general description for this method
64
+ # Line 1 for address
65
+ # @return [String]
66
+ attr_accessor :line_1
67
+
68
+ # Line 2 for address
69
+ # @return [String]
70
+ attr_accessor :line_2
71
+
72
+ # Line 2 for address
65
73
  # @return [DateTime]
66
74
  attr_accessor :deleted_at
67
75
 
68
76
  # A mapping from model property names to API property names.
69
77
  def self.names
70
- if @_hash.nil?
71
- @_hash = {}
72
- @_hash['id'] = 'id'
73
- @_hash['street'] = 'street'
74
- @_hash['number'] = 'number'
75
- @_hash['complement'] = 'complement'
76
- @_hash['zip_code'] = 'zip_code'
77
- @_hash['neighborhood'] = 'neighborhood'
78
- @_hash['city'] = 'city'
79
- @_hash['state'] = 'state'
80
- @_hash['country'] = 'country'
81
- @_hash['status'] = 'status'
82
- @_hash['created_at'] = 'created_at'
83
- @_hash['updated_at'] = 'updated_at'
84
- @_hash['customer'] = 'customer'
85
- @_hash['metadata'] = 'metadata'
86
- @_hash['deleted_at'] = 'deleted_at'
87
- end
78
+ @_hash = {} if @_hash.nil?
79
+ @_hash['id'] = 'id'
80
+ @_hash['street'] = 'street'
81
+ @_hash['number'] = 'number'
82
+ @_hash['complement'] = 'complement'
83
+ @_hash['zip_code'] = 'zip_code'
84
+ @_hash['neighborhood'] = 'neighborhood'
85
+ @_hash['city'] = 'city'
86
+ @_hash['state'] = 'state'
87
+ @_hash['country'] = 'country'
88
+ @_hash['status'] = 'status'
89
+ @_hash['created_at'] = 'created_at'
90
+ @_hash['updated_at'] = 'updated_at'
91
+ @_hash['customer'] = 'customer'
92
+ @_hash['metadata'] = 'metadata'
93
+ @_hash['line_1'] = 'line_1'
94
+ @_hash['line_2'] = 'line_2'
95
+ @_hash['deleted_at'] = 'deleted_at'
88
96
  @_hash
89
97
  end
90
98
 
@@ -102,6 +110,8 @@ module MundiApi
102
110
  updated_at = nil,
103
111
  customer = nil,
104
112
  metadata = nil,
113
+ line_1 = nil,
114
+ line_2 = nil,
105
115
  deleted_at = nil)
106
116
  @id = id
107
117
  @street = street
@@ -117,6 +127,8 @@ module MundiApi
117
127
  @updated_at = updated_at
118
128
  @customer = customer
119
129
  @metadata = metadata
130
+ @line_1 = line_1
131
+ @line_2 = line_2
120
132
  @deleted_at = deleted_at
121
133
  end
122
134
 
@@ -140,6 +152,8 @@ module MundiApi
140
152
  customer = GetCustomerResponse.from_hash(hash['customer']) if
141
153
  hash['customer']
142
154
  metadata = hash['metadata']
155
+ line_1 = hash['line_1']
156
+ line_2 = hash['line_2']
143
157
  deleted_at = DateTime.rfc3339(hash['deleted_at']) if hash['deleted_at']
144
158
 
145
159
  # Create object from extracted values.
@@ -157,6 +171,8 @@ module MundiApi
157
171
  updated_at,
158
172
  customer,
159
173
  metadata,
174
+ line_1,
175
+ line_2,
160
176
  deleted_at)
161
177
  end
162
178
  end