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
@@ -0,0 +1,42 @@
1
+ # This file was automatically generated by APIMATIC v2.0
2
+ # ( https://apimatic.io ).
3
+
4
+ module MundiApi
5
+ # Anticipation limit
6
+ class GetAnticipationLimitResponse < BaseModel
7
+ # Amount
8
+ # @return [Integer]
9
+ attr_accessor :amount
10
+
11
+ # Anticipation fee
12
+ # @return [Integer]
13
+ attr_accessor :anticipation_fee
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['anticipation_fee'] = 'anticipation_fee'
20
+ @_hash
21
+ end
22
+
23
+ def initialize(amount = nil,
24
+ anticipation_fee = nil)
25
+ @amount = amount
26
+ @anticipation_fee = anticipation_fee
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
+ anticipation_fee = hash['anticipation_fee']
36
+
37
+ # Create object from extracted values.
38
+ GetAnticipationLimitResponse.new(amount,
39
+ anticipation_fee)
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,42 @@
1
+ # This file was automatically generated by APIMATIC v2.0
2
+ # ( https://apimatic.io ).
3
+
4
+ module MundiApi
5
+ # Anticipation limits
6
+ class GetAnticipationLimitsResponse < BaseModel
7
+ # Max limit
8
+ # @return [GetAnticipationLimitResponse]
9
+ attr_accessor :max
10
+
11
+ # Min limit
12
+ # @return [GetAnticipationLimitResponse]
13
+ attr_accessor :min
14
+
15
+ # A mapping from model property names to API property names.
16
+ def self.names
17
+ @_hash = {} if @_hash.nil?
18
+ @_hash['max'] = 'max'
19
+ @_hash['min'] = 'min'
20
+ @_hash
21
+ end
22
+
23
+ def initialize(max = nil,
24
+ min = nil)
25
+ @max = max
26
+ @min = min
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
+ max = GetAnticipationLimitResponse.from_hash(hash['max']) if hash['max']
35
+ min = GetAnticipationLimitResponse.from_hash(hash['min']) if hash['min']
36
+
37
+ # Create object from extracted values.
38
+ GetAnticipationLimitsResponse.new(max,
39
+ min)
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,117 @@
1
+ # This file was automatically generated by APIMATIC v2.0
2
+ # ( https://apimatic.io ).
3
+
4
+ require 'date'
5
+ module MundiApi
6
+ # Anticipation
7
+ class GetAnticipationResponse < BaseModel
8
+ # Id
9
+ # @return [String]
10
+ attr_accessor :id
11
+
12
+ # Requested amount
13
+ # @return [Integer]
14
+ attr_accessor :requested_amount
15
+
16
+ # Approved amount
17
+ # @return [Integer]
18
+ attr_accessor :approved_amount
19
+
20
+ # Recipient
21
+ # @return [GetRecipientResponse]
22
+ attr_accessor :recipient
23
+
24
+ # Anticipation id on the gateway
25
+ # @return [String]
26
+ attr_accessor :pgid
27
+
28
+ # Creation date
29
+ # @return [DateTime]
30
+ attr_accessor :created_at
31
+
32
+ # Last update date
33
+ # @return [DateTime]
34
+ attr_accessor :updated_at
35
+
36
+ # Payment date
37
+ # @return [DateTime]
38
+ attr_accessor :payment_date
39
+
40
+ # Status
41
+ # @return [String]
42
+ attr_accessor :status
43
+
44
+ # Timeframe
45
+ # @return [String]
46
+ attr_accessor :timeframe
47
+
48
+ # A mapping from model property names to API property names.
49
+ def self.names
50
+ @_hash = {} if @_hash.nil?
51
+ @_hash['id'] = 'id'
52
+ @_hash['requested_amount'] = 'requested_amount'
53
+ @_hash['approved_amount'] = 'approved_amount'
54
+ @_hash['recipient'] = 'recipient'
55
+ @_hash['pgid'] = 'pgid'
56
+ @_hash['created_at'] = 'created_at'
57
+ @_hash['updated_at'] = 'updated_at'
58
+ @_hash['payment_date'] = 'payment_date'
59
+ @_hash['status'] = 'status'
60
+ @_hash['timeframe'] = 'timeframe'
61
+ @_hash
62
+ end
63
+
64
+ def initialize(id = nil,
65
+ requested_amount = nil,
66
+ approved_amount = nil,
67
+ recipient = nil,
68
+ pgid = nil,
69
+ created_at = nil,
70
+ updated_at = nil,
71
+ payment_date = nil,
72
+ status = nil,
73
+ timeframe = nil)
74
+ @id = id
75
+ @requested_amount = requested_amount
76
+ @approved_amount = approved_amount
77
+ @recipient = recipient
78
+ @pgid = pgid
79
+ @created_at = created_at
80
+ @updated_at = updated_at
81
+ @payment_date = payment_date
82
+ @status = status
83
+ @timeframe = timeframe
84
+ end
85
+
86
+ # Creates an instance of the object from a hash.
87
+ def self.from_hash(hash)
88
+ return nil unless hash
89
+
90
+ # Extract variables from the hash.
91
+ id = hash['id']
92
+ requested_amount = hash['requested_amount']
93
+ approved_amount = hash['approved_amount']
94
+ recipient = GetRecipientResponse.from_hash(hash['recipient']) if
95
+ hash['recipient']
96
+ pgid = hash['pgid']
97
+ created_at = DateTime.rfc3339(hash['created_at']) if hash['created_at']
98
+ updated_at = DateTime.rfc3339(hash['updated_at']) if hash['updated_at']
99
+ payment_date = DateTime.rfc3339(hash['payment_date']) if
100
+ hash['payment_date']
101
+ status = hash['status']
102
+ timeframe = hash['timeframe']
103
+
104
+ # Create object from extracted values.
105
+ GetAnticipationResponse.new(id,
106
+ requested_amount,
107
+ approved_amount,
108
+ recipient,
109
+ pgid,
110
+ created_at,
111
+ updated_at,
112
+ payment_date,
113
+ status,
114
+ timeframe)
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,52 @@
1
+ # This file was automatically generated by APIMATIC v2.0
2
+ # ( https://apimatic.io ).
3
+
4
+ module MundiApi
5
+ # Balance
6
+ class GetBalanceResponse < BaseModel
7
+ # Currency
8
+ # @return [String]
9
+ attr_accessor :currency
10
+
11
+ # Amount available for transferring
12
+ # @return [Integer]
13
+ attr_accessor :available_amount
14
+
15
+ # Recipient
16
+ # @return [GetRecipientResponse]
17
+ attr_accessor :recipient
18
+
19
+ # A mapping from model property names to API property names.
20
+ def self.names
21
+ @_hash = {} if @_hash.nil?
22
+ @_hash['currency'] = 'currency'
23
+ @_hash['available_amount'] = 'available_amount'
24
+ @_hash['recipient'] = 'recipient'
25
+ @_hash
26
+ end
27
+
28
+ def initialize(currency = nil,
29
+ available_amount = nil,
30
+ recipient = nil)
31
+ @currency = currency
32
+ @available_amount = available_amount
33
+ @recipient = recipient
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
+ currency = hash['currency']
42
+ available_amount = hash['available_amount']
43
+ recipient = GetRecipientResponse.from_hash(hash['recipient']) if
44
+ hash['recipient']
45
+
46
+ # Create object from extracted values.
47
+ GetBalanceResponse.new(currency,
48
+ available_amount,
49
+ recipient)
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,161 @@
1
+ # This file was automatically generated by APIMATIC v2.0
2
+ # ( https://apimatic.io ).
3
+
4
+ require 'date'
5
+ module MundiApi
6
+ # GetBankAccountResponse Model.
7
+ class GetBankAccountResponse < BaseModel
8
+ # Id
9
+ # @return [String]
10
+ attr_accessor :id
11
+
12
+ # Holder name
13
+ # @return [String]
14
+ attr_accessor :holder_name
15
+
16
+ # Holder type
17
+ # @return [String]
18
+ attr_accessor :holder_type
19
+
20
+ # Bank
21
+ # @return [String]
22
+ attr_accessor :bank
23
+
24
+ # Branch number
25
+ # @return [String]
26
+ attr_accessor :branch_number
27
+
28
+ # Branch check digit
29
+ # @return [String]
30
+ attr_accessor :branch_check_digit
31
+
32
+ # Account number
33
+ # @return [String]
34
+ attr_accessor :account_number
35
+
36
+ # Account check digit
37
+ # @return [String]
38
+ attr_accessor :account_check_digit
39
+
40
+ # Bank account type
41
+ # @return [String]
42
+ attr_accessor :type
43
+
44
+ # Bank account status
45
+ # @return [String]
46
+ attr_accessor :status
47
+
48
+ # Creation date
49
+ # @return [DateTime]
50
+ attr_accessor :created_at
51
+
52
+ # Last update date
53
+ # @return [DateTime]
54
+ attr_accessor :updated_at
55
+
56
+ # Deletion date
57
+ # @return [DateTime]
58
+ attr_accessor :deleted_at
59
+
60
+ # Recipient
61
+ # @return [GetRecipientResponse]
62
+ attr_accessor :recipient
63
+
64
+ # Metadata
65
+ # @return [Array<String, String>]
66
+ attr_accessor :metadata
67
+
68
+ # A mapping from model property names to API property names.
69
+ def self.names
70
+ @_hash = {} if @_hash.nil?
71
+ @_hash['id'] = 'id'
72
+ @_hash['holder_name'] = 'holder_name'
73
+ @_hash['holder_type'] = 'holder_type'
74
+ @_hash['bank'] = 'bank'
75
+ @_hash['branch_number'] = 'branch_number'
76
+ @_hash['branch_check_digit'] = 'branch_check_digit'
77
+ @_hash['account_number'] = 'account_number'
78
+ @_hash['account_check_digit'] = 'account_check_digit'
79
+ @_hash['type'] = 'type'
80
+ @_hash['status'] = 'status'
81
+ @_hash['created_at'] = 'created_at'
82
+ @_hash['updated_at'] = 'updated_at'
83
+ @_hash['deleted_at'] = 'deleted_at'
84
+ @_hash['recipient'] = 'recipient'
85
+ @_hash['metadata'] = 'metadata'
86
+ @_hash
87
+ end
88
+
89
+ def initialize(id = nil,
90
+ holder_name = nil,
91
+ holder_type = nil,
92
+ bank = nil,
93
+ branch_number = nil,
94
+ branch_check_digit = nil,
95
+ account_number = nil,
96
+ account_check_digit = nil,
97
+ type = nil,
98
+ status = nil,
99
+ created_at = nil,
100
+ updated_at = nil,
101
+ deleted_at = nil,
102
+ recipient = nil,
103
+ metadata = nil)
104
+ @id = id
105
+ @holder_name = holder_name
106
+ @holder_type = holder_type
107
+ @bank = bank
108
+ @branch_number = branch_number
109
+ @branch_check_digit = branch_check_digit
110
+ @account_number = account_number
111
+ @account_check_digit = account_check_digit
112
+ @type = type
113
+ @status = status
114
+ @created_at = created_at
115
+ @updated_at = updated_at
116
+ @deleted_at = deleted_at
117
+ @recipient = recipient
118
+ @metadata = metadata
119
+ end
120
+
121
+ # Creates an instance of the object from a hash.
122
+ def self.from_hash(hash)
123
+ return nil unless hash
124
+
125
+ # Extract variables from the hash.
126
+ id = hash['id']
127
+ holder_name = hash['holder_name']
128
+ holder_type = hash['holder_type']
129
+ bank = hash['bank']
130
+ branch_number = hash['branch_number']
131
+ branch_check_digit = hash['branch_check_digit']
132
+ account_number = hash['account_number']
133
+ account_check_digit = hash['account_check_digit']
134
+ type = hash['type']
135
+ status = hash['status']
136
+ created_at = DateTime.rfc3339(hash['created_at']) if hash['created_at']
137
+ updated_at = DateTime.rfc3339(hash['updated_at']) if hash['updated_at']
138
+ deleted_at = DateTime.rfc3339(hash['deleted_at']) if hash['deleted_at']
139
+ recipient = GetRecipientResponse.from_hash(hash['recipient']) if
140
+ hash['recipient']
141
+ metadata = hash['metadata']
142
+
143
+ # Create object from extracted values.
144
+ GetBankAccountResponse.new(id,
145
+ holder_name,
146
+ holder_type,
147
+ bank,
148
+ branch_number,
149
+ branch_check_digit,
150
+ account_number,
151
+ account_check_digit,
152
+ type,
153
+ status,
154
+ created_at,
155
+ updated_at,
156
+ deleted_at,
157
+ recipient,
158
+ metadata)
159
+ end
160
+ end
161
+ end
@@ -29,15 +29,13 @@ module MundiApi
29
29
 
30
30
  # A mapping from model property names to API property names.
31
31
  def self.names
32
- if @_hash.nil?
33
- @_hash = {}
34
- @_hash['url'] = 'url'
35
- @_hash['bank_tid'] = 'bank_tid'
36
- @_hash['bank'] = 'bank'
37
- @_hash['paid_at'] = 'paid_at'
38
- @_hash['paid_amount'] = 'paid_amount'
39
- @_hash = super().merge(@_hash)
40
- end
32
+ @_hash = {} if @_hash.nil?
33
+ @_hash['url'] = 'url'
34
+ @_hash['bank_tid'] = 'bank_tid'
35
+ @_hash['bank'] = 'bank'
36
+ @_hash['paid_at'] = 'paid_at'
37
+ @_hash['paid_amount'] = 'paid_amount'
38
+ @_hash = super().merge(@_hash)
41
39
  @_hash
42
40
  end
43
41
 
@@ -52,6 +50,8 @@ module MundiApi
52
50
  updated_at = nil,
53
51
  attempt_count = nil,
54
52
  max_attempts = nil,
53
+ splits = nil,
54
+ id = nil,
55
55
  paid_at = nil,
56
56
  paid_amount = nil,
57
57
  next_attempt = nil,
@@ -71,6 +71,8 @@ module MundiApi
71
71
  updated_at,
72
72
  attempt_count,
73
73
  max_attempts,
74
+ splits,
75
+ id,
74
76
  next_attempt,
75
77
  transaction_type)
76
78
  end
@@ -91,6 +93,15 @@ module MundiApi
91
93
  updated_at = DateTime.rfc3339(hash['updated_at']) if hash['updated_at']
92
94
  attempt_count = hash['attempt_count']
93
95
  max_attempts = hash['max_attempts']
96
+ # Parameter is an array, so we need to iterate through it
97
+ splits = nil
98
+ unless hash['splits'].nil?
99
+ splits = []
100
+ hash['splits'].each do |structure|
101
+ splits << (GetSplitResponse.from_hash(structure) if structure)
102
+ end
103
+ end
104
+ id = hash['id']
94
105
  paid_at = DateTime.rfc3339(hash['paid_at']) if hash['paid_at']
95
106
  paid_amount = hash['paid_amount']
96
107
  next_attempt = DateTime.rfc3339(hash['next_attempt']) if
@@ -109,6 +120,8 @@ module MundiApi
109
120
  updated_at,
110
121
  attempt_count,
111
122
  max_attempts,
123
+ splits,
124
+ id,
112
125
  paid_at,
113
126
  paid_amount,
114
127
  next_attempt,