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.
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
@@ -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['start_at'] = 'start_at'
33
- @_hash['end_at'] = 'end_at'
34
- @_hash['id'] = 'id'
35
- @_hash['billing_at'] = 'billing_at'
36
- @_hash['subscription'] = 'subscription'
37
- end
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['start_at'] = 'start_at'
32
+ @_hash['end_at'] = 'end_at'
33
+ @_hash['id'] = 'id'
34
+ @_hash['billing_at'] = 'billing_at'
35
+ @_hash['subscription'] = 'subscription'
38
36
  @_hash
39
37
  end
40
38
 
@@ -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
- @_hash = {}
23
- @_hash['country_code'] = 'country_code'
24
- @_hash['number'] = 'number'
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
- @_hash = {}
19
- @_hash['home_phone'] = 'home_phone'
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
 
@@ -51,20 +51,18 @@ module MundiApi
51
51
 
52
52
  # A mapping from model property names to API property names.
53
53
  def self.names
54
- if @_hash.nil?
55
- @_hash = {}
56
- @_hash['id'] = 'id'
57
- @_hash['name'] = 'name'
58
- @_hash['status'] = 'status'
59
- @_hash['created_at'] = 'created_at'
60
- @_hash['updated_at'] = 'updated_at'
61
- @_hash['pricing_scheme'] = 'pricing_scheme'
62
- @_hash['description'] = 'description'
63
- @_hash['plan'] = 'plan'
64
- @_hash['quantity'] = 'quantity'
65
- @_hash['cycles'] = 'cycles'
66
- @_hash['deleted_at'] = 'deleted_at'
67
- end
54
+ @_hash = {} if @_hash.nil?
55
+ @_hash['id'] = 'id'
56
+ @_hash['name'] = 'name'
57
+ @_hash['status'] = 'status'
58
+ @_hash['created_at'] = 'created_at'
59
+ @_hash['updated_at'] = 'updated_at'
60
+ @_hash['pricing_scheme'] = 'pricing_scheme'
61
+ @_hash['description'] = 'description'
62
+ @_hash['plan'] = 'plan'
63
+ @_hash['quantity'] = 'quantity'
64
+ @_hash['cycles'] = 'cycles'
65
+ @_hash['deleted_at'] = 'deleted_at'
68
66
  @_hash
69
67
  end
70
68
 
@@ -91,30 +91,28 @@ module MundiApi
91
91
 
92
92
  # A mapping from model property names to API property names.
93
93
  def self.names
94
- if @_hash.nil?
95
- @_hash = {}
96
- @_hash['id'] = 'id'
97
- @_hash['name'] = 'name'
98
- @_hash['description'] = 'description'
99
- @_hash['url'] = 'url'
100
- @_hash['statement_descriptor'] = 'statement_descriptor'
101
- @_hash['interval'] = 'interval'
102
- @_hash['interval_count'] = 'interval_count'
103
- @_hash['billing_type'] = 'billing_type'
104
- @_hash['payment_methods'] = 'payment_methods'
105
- @_hash['installments'] = 'installments'
106
- @_hash['status'] = 'status'
107
- @_hash['currency'] = 'currency'
108
- @_hash['created_at'] = 'created_at'
109
- @_hash['updated_at'] = 'updated_at'
110
- @_hash['items'] = 'items'
111
- @_hash['billing_days'] = 'billing_days'
112
- @_hash['shippable'] = 'shippable'
113
- @_hash['metadata'] = 'metadata'
114
- @_hash['trial_period_days'] = 'trial_period_days'
115
- @_hash['minimum_price'] = 'minimum_price'
116
- @_hash['deleted_at'] = 'deleted_at'
117
- end
94
+ @_hash = {} if @_hash.nil?
95
+ @_hash['id'] = 'id'
96
+ @_hash['name'] = 'name'
97
+ @_hash['description'] = 'description'
98
+ @_hash['url'] = 'url'
99
+ @_hash['statement_descriptor'] = 'statement_descriptor'
100
+ @_hash['interval'] = 'interval'
101
+ @_hash['interval_count'] = 'interval_count'
102
+ @_hash['billing_type'] = 'billing_type'
103
+ @_hash['payment_methods'] = 'payment_methods'
104
+ @_hash['installments'] = 'installments'
105
+ @_hash['status'] = 'status'
106
+ @_hash['currency'] = 'currency'
107
+ @_hash['created_at'] = 'created_at'
108
+ @_hash['updated_at'] = 'updated_at'
109
+ @_hash['items'] = 'items'
110
+ @_hash['billing_days'] = 'billing_days'
111
+ @_hash['shippable'] = 'shippable'
112
+ @_hash['metadata'] = 'metadata'
113
+ @_hash['trial_period_days'] = 'trial_period_days'
114
+ @_hash['minimum_price'] = 'minimum_price'
115
+ @_hash['deleted_at'] = 'deleted_at'
118
116
  @_hash
119
117
  end
120
118
 
@@ -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
- @_hash = {}
27
- @_hash['start_quantity'] = 'start_quantity'
28
- @_hash['price'] = 'price'
29
- @_hash['end_quantity'] = 'end_quantity'
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
- @_hash = {}
27
- @_hash['price'] = 'price'
28
- @_hash['scheme_type'] = 'scheme_type'
29
- @_hash['price_brackets'] = 'price_brackets'
30
- @_hash['minimum_price'] = 'minimum_price'
31
- end
25
+ @_hash = {} if @_hash.nil?
26
+ @_hash['price'] = 'price'
27
+ @_hash['scheme_type'] = 'scheme_type'
28
+ @_hash['price_brackets'] = 'price_brackets'
29
+ @_hash['minimum_price'] = 'minimum_price'
32
30
  @_hash
33
31
  end
34
32
 
@@ -0,0 +1,150 @@
1
+ # This file was automatically generated by APIMATIC v2.0
2
+ # ( https://apimatic.io ).
3
+
4
+ require 'date'
5
+ module MundiApi
6
+ # Recipient response
7
+ class GetRecipientResponse < BaseModel
8
+ # Id
9
+ # @return [String]
10
+ attr_accessor :id
11
+
12
+ # Name
13
+ # @return [String]
14
+ attr_accessor :name
15
+
16
+ # Email
17
+ # @return [String]
18
+ attr_accessor :email
19
+
20
+ # Document
21
+ # @return [String]
22
+ attr_accessor :document
23
+
24
+ # Description
25
+ # @return [String]
26
+ attr_accessor :description
27
+
28
+ # Type
29
+ # @return [String]
30
+ attr_accessor :type
31
+
32
+ # Status
33
+ # @return [String]
34
+ attr_accessor :status
35
+
36
+ # Creation date
37
+ # @return [DateTime]
38
+ attr_accessor :created_at
39
+
40
+ # Last update date
41
+ # @return [DateTime]
42
+ attr_accessor :updated_at
43
+
44
+ # Deletion date
45
+ # @return [DateTime]
46
+ attr_accessor :deleted_at
47
+
48
+ # Default bank account
49
+ # @return [GetBankAccountResponse]
50
+ attr_accessor :default_bank_account
51
+
52
+ # Info about the recipient on the gateway
53
+ # @return [List of GetGatewayRecipientResponse]
54
+ attr_accessor :gateway_recipients
55
+
56
+ # Metadata
57
+ # @return [Array<String, String>]
58
+ attr_accessor :metadata
59
+
60
+ # A mapping from model property names to API property names.
61
+ def self.names
62
+ @_hash = {} if @_hash.nil?
63
+ @_hash['id'] = 'id'
64
+ @_hash['name'] = 'name'
65
+ @_hash['email'] = 'email'
66
+ @_hash['document'] = 'document'
67
+ @_hash['description'] = 'description'
68
+ @_hash['type'] = 'type'
69
+ @_hash['status'] = 'status'
70
+ @_hash['created_at'] = 'created_at'
71
+ @_hash['updated_at'] = 'updated_at'
72
+ @_hash['deleted_at'] = 'deleted_at'
73
+ @_hash['default_bank_account'] = 'default_bank_account'
74
+ @_hash['gateway_recipients'] = 'gateway_recipients'
75
+ @_hash['metadata'] = 'metadata'
76
+ @_hash
77
+ end
78
+
79
+ def initialize(id = nil,
80
+ name = nil,
81
+ email = nil,
82
+ document = nil,
83
+ description = nil,
84
+ type = nil,
85
+ status = nil,
86
+ created_at = nil,
87
+ updated_at = nil,
88
+ deleted_at = nil,
89
+ default_bank_account = nil,
90
+ gateway_recipients = nil,
91
+ metadata = nil)
92
+ @id = id
93
+ @name = name
94
+ @email = email
95
+ @document = document
96
+ @description = description
97
+ @type = type
98
+ @status = status
99
+ @created_at = created_at
100
+ @updated_at = updated_at
101
+ @deleted_at = deleted_at
102
+ @default_bank_account = default_bank_account
103
+ @gateway_recipients = gateway_recipients
104
+ @metadata = metadata
105
+ end
106
+
107
+ # Creates an instance of the object from a hash.
108
+ def self.from_hash(hash)
109
+ return nil unless hash
110
+
111
+ # Extract variables from the hash.
112
+ id = hash['id']
113
+ name = hash['name']
114
+ email = hash['email']
115
+ document = hash['document']
116
+ description = hash['description']
117
+ type = hash['type']
118
+ status = hash['status']
119
+ created_at = DateTime.rfc3339(hash['created_at']) if hash['created_at']
120
+ updated_at = DateTime.rfc3339(hash['updated_at']) if hash['updated_at']
121
+ deleted_at = DateTime.rfc3339(hash['deleted_at']) if hash['deleted_at']
122
+ default_bank_account = GetBankAccountResponse.from_hash(hash['default_bank_account']) if
123
+ hash['default_bank_account']
124
+ # Parameter is an array, so we need to iterate through it
125
+ gateway_recipients = nil
126
+ unless hash['gateway_recipients'].nil?
127
+ gateway_recipients = []
128
+ hash['gateway_recipients'].each do |structure|
129
+ gateway_recipients << (GetGatewayRecipientResponse.from_hash(structure) if structure)
130
+ end
131
+ end
132
+ metadata = hash['metadata']
133
+
134
+ # Create object from extracted values.
135
+ GetRecipientResponse.new(id,
136
+ name,
137
+ email,
138
+ document,
139
+ description,
140
+ type,
141
+ status,
142
+ created_at,
143
+ updated_at,
144
+ deleted_at,
145
+ default_bank_account,
146
+ gateway_recipients,
147
+ metadata)
148
+ end
149
+ end
150
+ end
@@ -25,14 +25,12 @@ module MundiApi
25
25
 
26
26
  # A mapping from model property names to API property names.
27
27
  def self.names
28
- if @_hash.nil?
29
- @_hash = {}
30
- @_hash['url'] = 'url'
31
- @_hash['bank_tid'] = 'bank_tid'
32
- @_hash['paid_at'] = 'paid_at'
33
- @_hash['paid_amount'] = 'paid_amount'
34
- @_hash = super().merge(@_hash)
35
- end
28
+ @_hash = {} if @_hash.nil?
29
+ @_hash['url'] = 'url'
30
+ @_hash['bank_tid'] = 'bank_tid'
31
+ @_hash['paid_at'] = 'paid_at'
32
+ @_hash['paid_amount'] = 'paid_amount'
33
+ @_hash = super().merge(@_hash)
36
34
  @_hash
37
35
  end
38
36
 
@@ -46,6 +44,8 @@ module MundiApi
46
44
  updated_at = nil,
47
45
  attempt_count = nil,
48
46
  max_attempts = nil,
47
+ splits = nil,
48
+ id = nil,
49
49
  paid_at = nil,
50
50
  paid_amount = nil,
51
51
  next_attempt = nil,
@@ -64,6 +64,8 @@ module MundiApi
64
64
  updated_at,
65
65
  attempt_count,
66
66
  max_attempts,
67
+ splits,
68
+ id,
67
69
  next_attempt,
68
70
  transaction_type)
69
71
  end
@@ -83,6 +85,15 @@ module MundiApi
83
85
  updated_at = DateTime.rfc3339(hash['updated_at']) if hash['updated_at']
84
86
  attempt_count = hash['attempt_count']
85
87
  max_attempts = hash['max_attempts']
88
+ # Parameter is an array, so we need to iterate through it
89
+ splits = nil
90
+ unless hash['splits'].nil?
91
+ splits = []
92
+ hash['splits'].each do |structure|
93
+ splits << (GetSplitResponse.from_hash(structure) if structure)
94
+ end
95
+ end
96
+ id = hash['id']
86
97
  paid_at = DateTime.rfc3339(hash['paid_at']) if hash['paid_at']
87
98
  paid_amount = hash['paid_amount']
88
99
  next_attempt = DateTime.rfc3339(hash['next_attempt']) if
@@ -100,6 +111,8 @@ module MundiApi
100
111
  updated_at,
101
112
  attempt_count,
102
113
  max_attempts,
114
+ splits,
115
+ id,
103
116
  paid_at,
104
117
  paid_amount,
105
118
  next_attempt,
@@ -41,7 +41,7 @@ module MundiApi
41
41
  attr_accessor :address
42
42
 
43
43
  # Metadata
44
- # @return [Object]
44
+ # @return [Array<String, String>]
45
45
  attr_accessor :metadata
46
46
 
47
47
  # Deleted date
@@ -50,20 +50,18 @@ module MundiApi
50
50
 
51
51
  # A mapping from model property names to API property names.
52
52
  def self.names
53
- if @_hash.nil?
54
- @_hash = {}
55
- @_hash['id'] = 'id'
56
- @_hash['name'] = 'name'
57
- @_hash['code'] = 'code'
58
- @_hash['document'] = 'document'
59
- @_hash['description'] = 'description'
60
- @_hash['status'] = 'Status'
61
- @_hash['created_at'] = 'CreatedAt'
62
- @_hash['updated_at'] = 'UpdatedAt'
63
- @_hash['address'] = 'Address'
64
- @_hash['metadata'] = 'Metadata'
65
- @_hash['deleted_at'] = 'DeletedAt'
66
- end
53
+ @_hash = {} if @_hash.nil?
54
+ @_hash['id'] = 'id'
55
+ @_hash['name'] = 'name'
56
+ @_hash['code'] = 'code'
57
+ @_hash['document'] = 'document'
58
+ @_hash['description'] = 'description'
59
+ @_hash['status'] = 'Status'
60
+ @_hash['created_at'] = 'CreatedAt'
61
+ @_hash['updated_at'] = 'UpdatedAt'
62
+ @_hash['address'] = 'Address'
63
+ @_hash['metadata'] = 'Metadata'
64
+ @_hash['deleted_at'] = 'DeletedAt'
67
65
  @_hash
68
66
  end
69
67
 
@@ -0,0 +1,87 @@
1
+ # This file was automatically generated by APIMATIC v2.0
2
+ # ( https://apimatic.io ).
3
+
4
+ module MundiApi
5
+ # GetSellersRequest Model.
6
+ class GetSellersRequest < BaseModel
7
+ # TODO: Write general description for this method
8
+ # @return [String]
9
+ attr_accessor :name
10
+
11
+ # TODO: Write general description for this method
12
+ # @return [String]
13
+ attr_accessor :document
14
+
15
+ # TODO: Write general description for this method
16
+ # @return [String]
17
+ attr_accessor :code
18
+
19
+ # TODO: Write general description for this method
20
+ # @return [String]
21
+ attr_accessor :status
22
+
23
+ # TODO: Write general description for this method
24
+ # @return [String]
25
+ attr_accessor :type
26
+
27
+ # TODO: Write general description for this method
28
+ # @return [String]
29
+ attr_accessor :created_since
30
+
31
+ # TODO: Write general description for this method
32
+ # @return [String]
33
+ attr_accessor :created_until
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['document'] = 'document'
40
+ @_hash['code'] = 'code'
41
+ @_hash['status'] = 'status'
42
+ @_hash['type'] = 'type'
43
+ @_hash['created_since'] = 'created_Since'
44
+ @_hash['created_until'] = 'created_Until'
45
+ @_hash
46
+ end
47
+
48
+ def initialize(name = nil,
49
+ document = nil,
50
+ code = nil,
51
+ status = nil,
52
+ type = nil,
53
+ created_since = nil,
54
+ created_until = nil)
55
+ @name = name
56
+ @document = document
57
+ @code = code
58
+ @status = status
59
+ @type = type
60
+ @created_since = created_since
61
+ @created_until = created_until
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
+ document = hash['document']
71
+ code = hash['code']
72
+ status = hash['status']
73
+ type = hash['type']
74
+ created_since = hash['created_Since']
75
+ created_until = hash['created_Until']
76
+
77
+ # Create object from extracted values.
78
+ GetSellersRequest.new(name,
79
+ document,
80
+ code,
81
+ status,
82
+ type,
83
+ created_since,
84
+ created_until)
85
+ end
86
+ end
87
+ end