aurepay 0.1.0 → 0.1.3

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 (28) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aurepay/generated/api/chargebacks_api.rb +2 -2
  3. data/lib/aurepay/generated/api/company_api.rb +2 -2
  4. data/lib/aurepay/generated/api/conversions_api.rb +2 -2
  5. data/lib/aurepay/generated/api/deposits_api.rb +65 -2
  6. data/lib/aurepay/generated/api/wallets_api.rb +70 -2
  7. data/lib/aurepay/generated/api/webhooks_api.rb +2 -2
  8. data/lib/aurepay/generated/api/withdrawals_api.rb +65 -2
  9. data/lib/aurepay/generated/api_client.rb +2 -2
  10. data/lib/aurepay/generated/api_error.rb +2 -2
  11. data/lib/aurepay/generated/api_model_base.rb +2 -2
  12. data/lib/aurepay/generated/configuration.rb +2 -2
  13. data/lib/aurepay/generated/models/conversion_create.rb +2 -2
  14. data/lib/aurepay/generated/models/customer_input.rb +2 -2
  15. data/lib/aurepay/generated/models/customer_input_document.rb +2 -2
  16. data/lib/aurepay/generated/models/deposit_create.rb +3 -12
  17. data/lib/aurepay/generated/models/error_body.rb +2 -2
  18. data/lib/aurepay/generated/models/error_body_error.rb +2 -2
  19. data/lib/aurepay/generated/models/success_envelope.rb +2 -2
  20. data/lib/aurepay/generated/models/wallet_create.rb +84 -11
  21. data/lib/aurepay/generated/models/wallet_verification.rb +208 -0
  22. data/lib/aurepay/generated/models/wallet_verification_rejection.rb +158 -0
  23. data/lib/aurepay/generated/models/wallet_verification_rejection_reasons_inner.rb +165 -0
  24. data/lib/aurepay/generated/models/wallets_verification_resend_request.rb +147 -0
  25. data/lib/aurepay/generated/models/webhook_create.rb +2 -2
  26. data/lib/aurepay/generated/models/withdrawal_create.rb +2 -2
  27. data/lib/aurepay/version.rb +1 -1
  28. metadata +6 -2
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #AurePay REST API
3
3
 
4
- #API REST AurePay (camelCase inglês): depósitos PIX, saques, conversões BRL/USDT, webhooks, empresa, carteiras e MED/chargebacks. Auth: headers `X-Api-Key` e `X-Api-Secret`. Envelope: `{ \"success\": true, \"data\": ... }` / `{ \"success\": false, \"error\": { \"code\", \"message\", \"details\" } }`. Fonte para agentes: https://api.aurepay.com.br/llms-full.txt
4
+ #API REST AurePay (camelCase inglês): depósitos PIX, saques, conversões BRL/USDT, webhooks, empresa, carteiras e MED/chargebacks. Auth: headers `X-Api-Key` (`pk_live_`/`pk_test_`) e `X-Api-Secret` (`sk_live_`/`sk_test_`). Envelope: `{ \"success\": true, \"data\": ... }` / `{ \"success\": false, \"error\": { \"code\", \"message\", \"details\" } }`. Fonte para agentes: https://api.aurepay.com.br/llms-full.txt
5
5
 
6
- The version of the OpenAPI document: 0.1.0
6
+ The version of the OpenAPI document: 0.1.3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.23.0
@@ -17,13 +17,25 @@ module AurePay
17
17
  class WalletCreate < ApiModelBase
18
18
  attr_accessor :name
19
19
 
20
- attr_accessor :metadata
20
+ attr_accessor :external_id
21
+
22
+ # CNPJ obrigatório no modo walletMode=kyc
23
+ attr_accessor :tax_id
24
+
25
+ # E-mail do titular para convite KYC (modo kyc)
26
+ attr_accessor :email
27
+
28
+ # Telefone do titular para convite KYC (modo kyc)
29
+ attr_accessor :phone
21
30
 
22
31
  # Attribute mapping from ruby-style variable name to JSON key.
23
32
  def self.attribute_map
24
33
  {
25
34
  :'name' => :'name',
26
- :'metadata' => :'metadata'
35
+ :'external_id' => :'externalId',
36
+ :'tax_id' => :'taxId',
37
+ :'email' => :'email',
38
+ :'phone' => :'phone'
27
39
  }
28
40
  end
29
41
 
@@ -41,7 +53,10 @@ module AurePay
41
53
  def self.openapi_types
42
54
  {
43
55
  :'name' => :'String',
44
- :'metadata' => :'Hash<String, Object>'
56
+ :'external_id' => :'String',
57
+ :'tax_id' => :'String',
58
+ :'email' => :'String',
59
+ :'phone' => :'String'
45
60
  }
46
61
  end
47
62
 
@@ -69,12 +84,24 @@ module AurePay
69
84
 
70
85
  if attributes.key?(:'name')
71
86
  self.name = attributes[:'name']
87
+ else
88
+ self.name = nil
72
89
  end
73
90
 
74
- if attributes.key?(:'metadata')
75
- if (value = attributes[:'metadata']).is_a?(Hash)
76
- self.metadata = value
77
- end
91
+ if attributes.key?(:'external_id')
92
+ self.external_id = attributes[:'external_id']
93
+ end
94
+
95
+ if attributes.key?(:'tax_id')
96
+ self.tax_id = attributes[:'tax_id']
97
+ end
98
+
99
+ if attributes.key?(:'email')
100
+ self.email = attributes[:'email']
101
+ end
102
+
103
+ if attributes.key?(:'phone')
104
+ self.phone = attributes[:'phone']
78
105
  end
79
106
  end
80
107
 
@@ -83,6 +110,18 @@ module AurePay
83
110
  def list_invalid_properties
84
111
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
112
  invalid_properties = Array.new
113
+ if @name.nil?
114
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
115
+ end
116
+
117
+ if @name.to_s.length > 120
118
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 120.')
119
+ end
120
+
121
+ if !@external_id.nil? && @external_id.to_s.length > 128
122
+ invalid_properties.push('invalid value for "external_id", the character length must be smaller than or equal to 128.')
123
+ end
124
+
86
125
  invalid_properties
87
126
  end
88
127
 
@@ -90,16 +129,50 @@ module AurePay
90
129
  # @return true if the model is valid
91
130
  def valid?
92
131
  warn '[DEPRECATED] the `valid?` method is obsolete'
132
+ return false if @name.nil?
133
+ return false if @name.to_s.length > 120
134
+ return false if !@external_id.nil? && @external_id.to_s.length > 128
93
135
  true
94
136
  end
95
137
 
138
+ # Custom attribute writer method with validation
139
+ # @param [Object] name Value to be assigned
140
+ def name=(name)
141
+ if name.nil?
142
+ fail ArgumentError, 'name cannot be nil'
143
+ end
144
+
145
+ if name.to_s.length > 120
146
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 120.'
147
+ end
148
+
149
+ @name = name
150
+ end
151
+
152
+ # Custom attribute writer method with validation
153
+ # @param [Object] external_id Value to be assigned
154
+ def external_id=(external_id)
155
+ if external_id.nil?
156
+ fail ArgumentError, 'external_id cannot be nil'
157
+ end
158
+
159
+ if external_id.to_s.length > 128
160
+ fail ArgumentError, 'invalid value for "external_id", the character length must be smaller than or equal to 128.'
161
+ end
162
+
163
+ @external_id = external_id
164
+ end
165
+
96
166
  # Checks equality by comparing each attribute.
97
167
  # @param [Object] Object to be compared
98
168
  def ==(o)
99
169
  return true if self.equal?(o)
100
170
  self.class == o.class &&
101
171
  name == o.name &&
102
- metadata == o.metadata
172
+ external_id == o.external_id &&
173
+ tax_id == o.tax_id &&
174
+ email == o.email &&
175
+ phone == o.phone
103
176
  end
104
177
 
105
178
  # @see the `==` method
@@ -111,7 +184,7 @@ module AurePay
111
184
  # Calculates hash code according to all attributes.
112
185
  # @return [Integer] Hash code
113
186
  def hash
114
- [name, metadata].hash
187
+ [name, external_id, tax_id, email, phone].hash
115
188
  end
116
189
 
117
190
  # Builds the object from hash
@@ -0,0 +1,208 @@
1
+ =begin
2
+ #AurePay REST API
3
+
4
+ #API REST AurePay (camelCase inglês): depósitos PIX, saques, conversões BRL/USDT, webhooks, empresa, carteiras e MED/chargebacks. Auth: headers `X-Api-Key` (`pk_live_`/`pk_test_`) e `X-Api-Secret` (`sk_live_`/`sk_test_`). Envelope: `{ \"success\": true, \"data\": ... }` / `{ \"success\": false, \"error\": { \"code\", \"message\", \"details\" } }`. Fonte para agentes: https://api.aurepay.com.br/llms-full.txt
5
+
6
+ The version of the OpenAPI document: 0.1.3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module AurePay
17
+ class WalletVerification < ApiModelBase
18
+ attr_accessor :status
19
+
20
+ attr_accessor :invite_email
21
+
22
+ attr_accessor :invite_phone
23
+
24
+ attr_accessor :rejection
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'status' => :'status',
52
+ :'invite_email' => :'inviteEmail',
53
+ :'invite_phone' => :'invitePhone',
54
+ :'rejection' => :'rejection'
55
+ }
56
+ end
57
+
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ acceptable_attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'status' => :'String',
72
+ :'invite_email' => :'String',
73
+ :'invite_phone' => :'String',
74
+ :'rejection' => :'WalletVerificationRejection'
75
+ }
76
+ end
77
+
78
+ # List of attributes with nullable: true
79
+ def self.openapi_nullable
80
+ Set.new([
81
+ ])
82
+ end
83
+
84
+ # Initializes the object
85
+ # @param [Hash] attributes Model attributes in the form of hash
86
+ def initialize(attributes = {})
87
+ if (!attributes.is_a?(Hash))
88
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AurePay::WalletVerification` initialize method"
89
+ end
90
+
91
+ # check to see if the attribute exists and convert string to symbol for hash key
92
+ acceptable_attribute_map = self.class.acceptable_attribute_map
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!acceptable_attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AurePay::WalletVerification`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'status')
101
+ self.status = attributes[:'status']
102
+ end
103
+
104
+ if attributes.key?(:'invite_email')
105
+ self.invite_email = attributes[:'invite_email']
106
+ end
107
+
108
+ if attributes.key?(:'invite_phone')
109
+ self.invite_phone = attributes[:'invite_phone']
110
+ end
111
+
112
+ if attributes.key?(:'rejection')
113
+ self.rejection = attributes[:'rejection']
114
+ end
115
+ end
116
+
117
+ # Show invalid properties with the reasons. Usually used together with valid?
118
+ # @return Array for valid properties with the reasons
119
+ def list_invalid_properties
120
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
121
+ invalid_properties = Array.new
122
+ invalid_properties
123
+ end
124
+
125
+ # Check to see if the all the properties in the model are valid
126
+ # @return true if the model is valid
127
+ def valid?
128
+ warn '[DEPRECATED] the `valid?` method is obsolete'
129
+ status_validator = EnumAttributeValidator.new('String', ["invited", "submitted", "approved", "rejected", "rejectedTerminal"])
130
+ return false unless status_validator.valid?(@status)
131
+ true
132
+ end
133
+
134
+ # Custom attribute writer method checking allowed values (enum).
135
+ # @param [Object] status Object to be assigned
136
+ def status=(status)
137
+ validator = EnumAttributeValidator.new('String', ["invited", "submitted", "approved", "rejected", "rejectedTerminal"])
138
+ unless validator.valid?(status)
139
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
140
+ end
141
+ @status = status
142
+ end
143
+
144
+ # Checks equality by comparing each attribute.
145
+ # @param [Object] Object to be compared
146
+ def ==(o)
147
+ return true if self.equal?(o)
148
+ self.class == o.class &&
149
+ status == o.status &&
150
+ invite_email == o.invite_email &&
151
+ invite_phone == o.invite_phone &&
152
+ rejection == o.rejection
153
+ end
154
+
155
+ # @see the `==` method
156
+ # @param [Object] Object to be compared
157
+ def eql?(o)
158
+ self == o
159
+ end
160
+
161
+ # Calculates hash code according to all attributes.
162
+ # @return [Integer] Hash code
163
+ def hash
164
+ [status, invite_email, invite_phone, rejection].hash
165
+ end
166
+
167
+ # Builds the object from hash
168
+ # @param [Hash] attributes Model attributes in the form of hash
169
+ # @return [Object] Returns the model itself
170
+ def self.build_from_hash(attributes)
171
+ return nil unless attributes.is_a?(Hash)
172
+ attributes = attributes.transform_keys(&:to_sym)
173
+ transformed_hash = {}
174
+ openapi_types.each_pair do |key, type|
175
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
176
+ transformed_hash["#{key}"] = nil
177
+ elsif type =~ /\AArray<(.*)>/i
178
+ # check to ensure the input is an array given that the attribute
179
+ # is documented as an array but the input is not
180
+ if attributes[attribute_map[key]].is_a?(Array)
181
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
182
+ end
183
+ elsif !attributes[attribute_map[key]].nil?
184
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
185
+ end
186
+ end
187
+ new(transformed_hash)
188
+ end
189
+
190
+ # Returns the object in the form of hash
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_hash
193
+ hash = {}
194
+ self.class.attribute_map.each_pair do |attr, param|
195
+ value = self.send(attr)
196
+ if value.nil?
197
+ is_nullable = self.class.openapi_nullable.include?(attr)
198
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
199
+ end
200
+
201
+ hash[param] = _to_hash(value)
202
+ end
203
+ hash
204
+ end
205
+
206
+ end
207
+
208
+ end
@@ -0,0 +1,158 @@
1
+ =begin
2
+ #AurePay REST API
3
+
4
+ #API REST AurePay (camelCase inglês): depósitos PIX, saques, conversões BRL/USDT, webhooks, empresa, carteiras e MED/chargebacks. Auth: headers `X-Api-Key` (`pk_live_`/`pk_test_`) e `X-Api-Secret` (`sk_live_`/`sk_test_`). Envelope: `{ \"success\": true, \"data\": ... }` / `{ \"success\": false, \"error\": { \"code\", \"message\", \"details\" } }`. Fonte para agentes: https://api.aurepay.com.br/llms-full.txt
5
+
6
+ The version of the OpenAPI document: 0.1.3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module AurePay
17
+ class WalletVerificationRejection < ApiModelBase
18
+ attr_accessor :terminal
19
+
20
+ attr_accessor :reasons
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'terminal' => :'terminal',
26
+ :'reasons' => :'reasons'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'terminal' => :'Boolean',
44
+ :'reasons' => :'Array<WalletVerificationRejectionReasonsInner>'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AurePay::WalletVerificationRejection` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AurePay::WalletVerificationRejection`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'terminal')
71
+ self.terminal = attributes[:'terminal']
72
+ end
73
+
74
+ if attributes.key?(:'reasons')
75
+ if (value = attributes[:'reasons']).is_a?(Array)
76
+ self.reasons = value
77
+ end
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ terminal == o.terminal &&
102
+ reasons == o.reasons
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [terminal, reasons].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
127
+ elsif type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
+ end
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
+ end
136
+ end
137
+ new(transformed_hash)
138
+ end
139
+
140
+ # Returns the object in the form of hash
141
+ # @return [Hash] Returns the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ if value.nil?
147
+ is_nullable = self.class.openapi_nullable.include?(attr)
148
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
+ end
150
+
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ end
157
+
158
+ end
@@ -0,0 +1,165 @@
1
+ =begin
2
+ #AurePay REST API
3
+
4
+ #API REST AurePay (camelCase inglês): depósitos PIX, saques, conversões BRL/USDT, webhooks, empresa, carteiras e MED/chargebacks. Auth: headers `X-Api-Key` (`pk_live_`/`pk_test_`) e `X-Api-Secret` (`sk_live_`/`sk_test_`). Envelope: `{ \"success\": true, \"data\": ... }` / `{ \"success\": false, \"error\": { \"code\", \"message\", \"details\" } }`. Fonte para agentes: https://api.aurepay.com.br/llms-full.txt
5
+
6
+ The version of the OpenAPI document: 0.1.3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module AurePay
17
+ class WalletVerificationRejectionReasonsInner < ApiModelBase
18
+ attr_accessor :code
19
+
20
+ attr_accessor :field
21
+
22
+ attr_accessor :message
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'code' => :'code',
28
+ :'field' => :'field',
29
+ :'message' => :'message'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'code' => :'String',
47
+ :'field' => :'String',
48
+ :'message' => :'String'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AurePay::WalletVerificationRejectionReasonsInner` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AurePay::WalletVerificationRejectionReasonsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'code')
75
+ self.code = attributes[:'code']
76
+ end
77
+
78
+ if attributes.key?(:'field')
79
+ self.field = attributes[:'field']
80
+ end
81
+
82
+ if attributes.key?(:'message')
83
+ self.message = attributes[:'message']
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
91
+ invalid_properties = Array.new
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ code == o.code &&
108
+ field == o.field &&
109
+ message == o.message
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [code, field, message].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ end