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
@@ -6,19 +6,17 @@ module MundiApi
6
6
  class CreateAccessTokenRequest < BaseModel
7
7
  # Minutes to expire the token
8
8
  # @return [Integer]
9
- attr_accessor :esxpires_in
9
+ attr_accessor :expires_in
10
10
 
11
11
  # A mapping from model property names to API property names.
12
12
  def self.names
13
- if @_hash.nil?
14
- @_hash = {}
15
- @_hash['esxpires_in'] = 'esxpires_in'
16
- end
13
+ @_hash = {} if @_hash.nil?
14
+ @_hash['expires_in'] = 'expires_in'
17
15
  @_hash
18
16
  end
19
17
 
20
- def initialize(esxpires_in = nil)
21
- @esxpires_in = esxpires_in
18
+ def initialize(expires_in = nil)
19
+ @expires_in = expires_in
22
20
  end
23
21
 
24
22
  # Creates an instance of the object from a hash.
@@ -26,10 +24,10 @@ module MundiApi
26
24
  return nil unless hash
27
25
 
28
26
  # Extract variables from the hash.
29
- esxpires_in = hash['esxpires_in']
27
+ expires_in = hash['expires_in']
30
28
 
31
29
  # Create object from extracted values.
32
- CreateAccessTokenRequest.new(esxpires_in)
30
+ CreateAccessTokenRequest.new(expires_in)
33
31
  end
34
32
  end
35
33
  end
@@ -41,20 +41,28 @@ module MundiApi
41
41
  # @return [Array<String, String>]
42
42
  attr_accessor :metadata
43
43
 
44
+ # Line 1 for address
45
+ # @return [String]
46
+ attr_accessor :line_1
47
+
48
+ # Line 2 for address
49
+ # @return [String]
50
+ attr_accessor :line_2
51
+
44
52
  # A mapping from model property names to API property names.
45
53
  def self.names
46
- if @_hash.nil?
47
- @_hash = {}
48
- @_hash['street'] = 'street'
49
- @_hash['number'] = 'number'
50
- @_hash['zip_code'] = 'zip_code'
51
- @_hash['neighborhood'] = 'neighborhood'
52
- @_hash['city'] = 'city'
53
- @_hash['state'] = 'state'
54
- @_hash['country'] = 'country'
55
- @_hash['complement'] = 'complement'
56
- @_hash['metadata'] = 'metadata'
57
- end
54
+ @_hash = {} if @_hash.nil?
55
+ @_hash['street'] = 'street'
56
+ @_hash['number'] = 'number'
57
+ @_hash['zip_code'] = 'zip_code'
58
+ @_hash['neighborhood'] = 'neighborhood'
59
+ @_hash['city'] = 'city'
60
+ @_hash['state'] = 'state'
61
+ @_hash['country'] = 'country'
62
+ @_hash['complement'] = 'complement'
63
+ @_hash['metadata'] = 'metadata'
64
+ @_hash['line_1'] = 'line_1'
65
+ @_hash['line_2'] = 'line_2'
58
66
  @_hash
59
67
  end
60
68
 
@@ -66,7 +74,9 @@ module MundiApi
66
74
  state = nil,
67
75
  country = nil,
68
76
  complement = nil,
69
- metadata = nil)
77
+ metadata = nil,
78
+ line_1 = nil,
79
+ line_2 = nil)
70
80
  @street = street
71
81
  @number = number
72
82
  @zip_code = zip_code
@@ -76,6 +86,8 @@ module MundiApi
76
86
  @country = country
77
87
  @complement = complement
78
88
  @metadata = metadata
89
+ @line_1 = line_1
90
+ @line_2 = line_2
79
91
  end
80
92
 
81
93
  # Creates an instance of the object from a hash.
@@ -92,6 +104,8 @@ module MundiApi
92
104
  country = hash['country']
93
105
  complement = hash['complement']
94
106
  metadata = hash['metadata']
107
+ line_1 = hash['line_1']
108
+ line_2 = hash['line_2']
95
109
 
96
110
  # Create object from extracted values.
97
111
  CreateAddressRequest.new(street,
@@ -102,7 +116,9 @@ module MundiApi
102
116
  state,
103
117
  country,
104
118
  complement,
105
- metadata)
119
+ metadata,
120
+ line_1,
121
+ line_2)
106
122
  end
107
123
  end
108
124
  end
@@ -0,0 +1,53 @@
1
+ # This file was automatically generated by APIMATIC v2.0
2
+ # ( https://apimatic.io ).
3
+
4
+ require 'date'
5
+ module MundiApi
6
+ # Request for creating an anticipation
7
+ class CreateAnticipationRequest < BaseModel
8
+ # Amount requested for the anticipation
9
+ # @return [Integer]
10
+ attr_accessor :amount
11
+
12
+ # Timeframe
13
+ # @return [String]
14
+ attr_accessor :timeframe
15
+
16
+ # Payment date
17
+ # @return [DateTime]
18
+ attr_accessor :payment_date
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['amount'] = 'amount'
24
+ @_hash['timeframe'] = 'timeframe'
25
+ @_hash['payment_date'] = 'payment_date'
26
+ @_hash
27
+ end
28
+
29
+ def initialize(amount = nil,
30
+ timeframe = nil,
31
+ payment_date = nil)
32
+ @amount = amount
33
+ @timeframe = timeframe
34
+ @payment_date = payment_date
35
+ end
36
+
37
+ # Creates an instance of the object from a hash.
38
+ def self.from_hash(hash)
39
+ return nil unless hash
40
+
41
+ # Extract variables from the hash.
42
+ amount = hash['amount']
43
+ timeframe = hash['timeframe']
44
+ payment_date = DateTime.rfc3339(hash['payment_date']) if
45
+ hash['payment_date']
46
+
47
+ # Create object from extracted values.
48
+ CreateAnticipationRequest.new(amount,
49
+ timeframe,
50
+ payment_date)
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,114 @@
1
+ # This file was automatically generated by APIMATIC v2.0
2
+ # ( https://apimatic.io ).
3
+
4
+ module MundiApi
5
+ # Request for creating a bank account
6
+ class CreateBankAccountRequest < BaseModel
7
+ # Bank account holder name
8
+ # @return [String]
9
+ attr_accessor :holder_name
10
+
11
+ # Bank account holder type
12
+ # @return [String]
13
+ attr_accessor :holder_type
14
+
15
+ # Bank account holder document
16
+ # @return [String]
17
+ attr_accessor :holder_document
18
+
19
+ # Bank
20
+ # @return [String]
21
+ attr_accessor :bank
22
+
23
+ # Branch number
24
+ # @return [String]
25
+ attr_accessor :branch_number
26
+
27
+ # Branch check digit
28
+ # @return [String]
29
+ attr_accessor :branch_check_digit
30
+
31
+ # Account number
32
+ # @return [String]
33
+ attr_accessor :account_number
34
+
35
+ # Account check digit
36
+ # @return [String]
37
+ attr_accessor :account_check_digit
38
+
39
+ # Bank account type
40
+ # @return [String]
41
+ attr_accessor :type
42
+
43
+ # Metadata
44
+ # @return [Array<String, String>]
45
+ attr_accessor :metadata
46
+
47
+ # A mapping from model property names to API property names.
48
+ def self.names
49
+ @_hash = {} if @_hash.nil?
50
+ @_hash['holder_name'] = 'holder_name'
51
+ @_hash['holder_type'] = 'holder_type'
52
+ @_hash['holder_document'] = 'holder_document'
53
+ @_hash['bank'] = 'bank'
54
+ @_hash['branch_number'] = 'branch_number'
55
+ @_hash['branch_check_digit'] = 'branch_check_digit'
56
+ @_hash['account_number'] = 'account_number'
57
+ @_hash['account_check_digit'] = 'account_check_digit'
58
+ @_hash['type'] = 'type'
59
+ @_hash['metadata'] = 'metadata'
60
+ @_hash
61
+ end
62
+
63
+ def initialize(holder_name = nil,
64
+ holder_type = nil,
65
+ holder_document = nil,
66
+ bank = nil,
67
+ branch_number = nil,
68
+ branch_check_digit = nil,
69
+ account_number = nil,
70
+ account_check_digit = nil,
71
+ type = nil,
72
+ metadata = nil)
73
+ @holder_name = holder_name
74
+ @holder_type = holder_type
75
+ @holder_document = holder_document
76
+ @bank = bank
77
+ @branch_number = branch_number
78
+ @branch_check_digit = branch_check_digit
79
+ @account_number = account_number
80
+ @account_check_digit = account_check_digit
81
+ @type = type
82
+ @metadata = metadata
83
+ end
84
+
85
+ # Creates an instance of the object from a hash.
86
+ def self.from_hash(hash)
87
+ return nil unless hash
88
+
89
+ # Extract variables from the hash.
90
+ holder_name = hash['holder_name']
91
+ holder_type = hash['holder_type']
92
+ holder_document = hash['holder_document']
93
+ bank = hash['bank']
94
+ branch_number = hash['branch_number']
95
+ branch_check_digit = hash['branch_check_digit']
96
+ account_number = hash['account_number']
97
+ account_check_digit = hash['account_check_digit']
98
+ type = hash['type']
99
+ metadata = hash['metadata']
100
+
101
+ # Create object from extracted values.
102
+ CreateBankAccountRequest.new(holder_name,
103
+ holder_type,
104
+ holder_document,
105
+ bank,
106
+ branch_number,
107
+ branch_check_digit,
108
+ account_number,
109
+ account_check_digit,
110
+ type,
111
+ metadata)
112
+ end
113
+ end
114
+ 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['bank'] = 'bank'
20
- @_hash['retries'] = 'retries'
21
- end
17
+ @_hash = {} if @_hash.nil?
18
+ @_hash['bank'] = 'bank'
19
+ @_hash['retries'] = 'retries'
22
20
  @_hash
23
21
  end
24
22
 
@@ -30,17 +30,20 @@ module MundiApi
30
30
  # @return [String]
31
31
  attr_accessor :billing_address_id
32
32
 
33
+ # Número de identificação do cliente com o banco
34
+ # @return [String]
35
+ attr_accessor :nosso_numero
36
+
33
37
  # A mapping from model property names to API property names.
34
38
  def self.names
35
- if @_hash.nil?
36
- @_hash = {}
37
- @_hash['retries'] = 'retries'
38
- @_hash['bank'] = 'bank'
39
- @_hash['instructions'] = 'instructions'
40
- @_hash['due_at'] = 'due_at'
41
- @_hash['billing_address'] = 'billing_address'
42
- @_hash['billing_address_id'] = 'billing_address_id'
43
- end
39
+ @_hash = {} if @_hash.nil?
40
+ @_hash['retries'] = 'retries'
41
+ @_hash['bank'] = 'bank'
42
+ @_hash['instructions'] = 'instructions'
43
+ @_hash['due_at'] = 'due_at'
44
+ @_hash['billing_address'] = 'billing_address'
45
+ @_hash['billing_address_id'] = 'billing_address_id'
46
+ @_hash['nosso_numero'] = 'nosso_numero'
44
47
  @_hash
45
48
  end
46
49
 
@@ -49,13 +52,15 @@ module MundiApi
49
52
  instructions = nil,
50
53
  due_at = nil,
51
54
  billing_address = nil,
52
- billing_address_id = nil)
55
+ billing_address_id = nil,
56
+ nosso_numero = nil)
53
57
  @retries = retries
54
58
  @bank = bank
55
59
  @instructions = instructions
56
60
  @due_at = due_at
57
61
  @billing_address = billing_address
58
62
  @billing_address_id = billing_address_id
63
+ @nosso_numero = nosso_numero
59
64
  end
60
65
 
61
66
  # Creates an instance of the object from a hash.
@@ -70,6 +75,7 @@ module MundiApi
70
75
  billing_address = CreateAddressRequest.from_hash(hash['billing_address']) if
71
76
  hash['billing_address']
72
77
  billing_address_id = hash['billing_address_id']
78
+ nosso_numero = hash['nosso_numero']
73
79
 
74
80
  # Create object from extracted values.
75
81
  CreateBoletoPaymentRequest.new(retries,
@@ -77,7 +83,8 @@ module MundiApi
77
83
  instructions,
78
84
  due_at,
79
85
  billing_address,
80
- billing_address_id)
86
+ billing_address_id,
87
+ nosso_numero)
81
88
  end
82
89
  end
83
90
  end
@@ -10,10 +10,8 @@ module MundiApi
10
10
 
11
11
  # A mapping from model property names to API property names.
12
12
  def self.names
13
- if @_hash.nil?
14
- @_hash = {}
15
- @_hash['amount'] = 'amount'
16
- end
13
+ @_hash = {} if @_hash.nil?
14
+ @_hash['amount'] = 'amount'
17
15
  @_hash
18
16
  end
19
17
 
@@ -10,10 +10,8 @@ module MundiApi
10
10
 
11
11
  # A mapping from model property names to API property names.
12
12
  def self.names
13
- if @_hash.nil?
14
- @_hash = {}
15
- @_hash['cancel_pending_invoices'] = 'cancel_pending_invoices'
16
- end
13
+ @_hash = {} if @_hash.nil?
14
+ @_hash['cancel_pending_invoices'] = 'cancel_pending_invoices'
17
15
  @_hash
18
16
  end
19
17
 
@@ -15,11 +15,9 @@ module MundiApi
15
15
 
16
16
  # A mapping from model property names to API property names.
17
17
  def self.names
18
- if @_hash.nil?
19
- @_hash = {}
20
- @_hash['code'] = 'code'
21
- @_hash['amount'] = 'amount'
22
- end
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['code'] = 'code'
20
+ @_hash['amount'] = 'amount'
23
21
  @_hash
24
22
  end
25
23
 
@@ -11,10 +11,8 @@ module MundiApi
11
11
 
12
12
  # A mapping from model property names to API property names.
13
13
  def self.names
14
- if @_hash.nil?
15
- @_hash = {}
16
- @_hash['verify_card'] = 'verify_card'
17
- end
14
+ @_hash = {} if @_hash.nil?
15
+ @_hash['verify_card'] = 'verify_card'
18
16
  @_hash
19
17
  end
20
18
 
@@ -52,23 +52,26 @@ module MundiApi
52
52
  # @return [String]
53
53
  attr_accessor :holder_document
54
54
 
55
+ # Indicates whether it is a private label card
56
+ # @return [Boolean]
57
+ attr_accessor :private_label
58
+
55
59
  # A mapping from model property names to API property names.
56
60
  def self.names
57
- if @_hash.nil?
58
- @_hash = {}
59
- @_hash['number'] = 'number'
60
- @_hash['holder_name'] = 'holder_name'
61
- @_hash['exp_month'] = 'exp_month'
62
- @_hash['exp_year'] = 'exp_year'
63
- @_hash['cvv'] = 'cvv'
64
- @_hash['billing_address'] = 'billing_address'
65
- @_hash['brand'] = 'brand'
66
- @_hash['billing_address_id'] = 'billing_address_id'
67
- @_hash['metadata'] = 'metadata'
68
- @_hash['type'] = 'type'
69
- @_hash['options'] = 'options'
70
- @_hash['holder_document'] = 'holder_document'
71
- end
61
+ @_hash = {} if @_hash.nil?
62
+ @_hash['number'] = 'number'
63
+ @_hash['holder_name'] = 'holder_name'
64
+ @_hash['exp_month'] = 'exp_month'
65
+ @_hash['exp_year'] = 'exp_year'
66
+ @_hash['cvv'] = 'cvv'
67
+ @_hash['billing_address'] = 'billing_address'
68
+ @_hash['brand'] = 'brand'
69
+ @_hash['billing_address_id'] = 'billing_address_id'
70
+ @_hash['metadata'] = 'metadata'
71
+ @_hash['type'] = 'type'
72
+ @_hash['options'] = 'options'
73
+ @_hash['holder_document'] = 'holder_document'
74
+ @_hash['private_label'] = 'private_label'
72
75
  @_hash
73
76
  end
74
77
 
@@ -83,7 +86,8 @@ module MundiApi
83
86
  metadata = nil,
84
87
  type = 'credit',
85
88
  options = nil,
86
- holder_document = nil)
89
+ holder_document = nil,
90
+ private_label = nil)
87
91
  @number = number
88
92
  @holder_name = holder_name
89
93
  @exp_month = exp_month
@@ -96,6 +100,7 @@ module MundiApi
96
100
  @type = type
97
101
  @options = options
98
102
  @holder_document = holder_document
103
+ @private_label = private_label
99
104
  end
100
105
 
101
106
  # Creates an instance of the object from a hash.
@@ -117,6 +122,7 @@ module MundiApi
117
122
  options = CreateCardOptionsRequest.from_hash(hash['options']) if
118
123
  hash['options']
119
124
  holder_document = hash['holder_document']
125
+ private_label = hash['private_label']
120
126
 
121
127
  # Create object from extracted values.
122
128
  CreateCardRequest.new(number,
@@ -130,7 +136,8 @@ module MundiApi
130
136
  metadata,
131
137
  type,
132
138
  options,
133
- holder_document)
139
+ holder_document,
140
+ private_label)
134
141
  end
135
142
  end
136
143
  end