jamm 1.3.0 → 1.4.0

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 (83) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/jamm/api/api/customer_api.rb +82 -52
  4. data/lib/jamm/api/api/healthcheck_api.rb +18 -15
  5. data/lib/jamm/api/api/payment_api.rb +113 -62
  6. data/lib/jamm/api/api/webhook_service_api.rb +41 -28
  7. data/lib/jamm/api/api_client.rb +74 -66
  8. data/lib/jamm/api/api_error.rb +16 -16
  9. data/lib/jamm/api/configuration.rb +42 -34
  10. data/lib/jamm/api/models/apiv1_error.rb +56 -44
  11. data/lib/jamm/api/models/apiv1_status.rb +57 -47
  12. data/lib/jamm/api/models/customer_service_update_customer_body.rb +107 -69
  13. data/lib/jamm/api/models/googlerpc_status.rb +61 -45
  14. data/lib/jamm/api/models/protobuf_any.rb +42 -35
  15. data/lib/jamm/api/models/v1_add_charge_request.rb +59 -44
  16. data/lib/jamm/api/models/v1_add_charge_response.rb +59 -44
  17. data/lib/jamm/api/models/v1_bank.rb +150 -95
  18. data/lib/jamm/api/models/v1_bank_assets.rb +60 -47
  19. data/lib/jamm/api/models/v1_bank_branch.rb +83 -56
  20. data/lib/jamm/api/models/v1_bank_information.rb +71 -51
  21. data/lib/jamm/api/models/v1_bank_quota.rb +99 -64
  22. data/lib/jamm/api/models/v1_bank_scheduled_maintenance_period.rb +75 -52
  23. data/lib/jamm/api/models/v1_buyer.rb +104 -76
  24. data/lib/jamm/api/models/v1_charge.rb +67 -52
  25. data/lib/jamm/api/models/v1_charge_message.rb +151 -93
  26. data/lib/jamm/api/models/v1_charge_message_status.rb +17 -18
  27. data/lib/jamm/api/models/v1_charge_result.rb +152 -93
  28. data/lib/jamm/api/models/v1_contract.rb +64 -52
  29. data/lib/jamm/api/models/v1_contract_message.rb +67 -48
  30. data/lib/jamm/api/models/v1_contract_status.rb +20 -21
  31. data/lib/jamm/api/models/v1_create_contract_with_charge_request.rb +59 -44
  32. data/lib/jamm/api/models/v1_create_contract_with_charge_response.rb +67 -48
  33. data/lib/jamm/api/models/v1_create_contract_without_charge_request.rb +51 -40
  34. data/lib/jamm/api/models/v1_create_contract_without_charge_response.rb +59 -44
  35. data/lib/jamm/api/models/v1_create_customer_request.rb +42 -35
  36. data/lib/jamm/api/models/v1_create_customer_response.rb +42 -35
  37. data/lib/jamm/api/models/v1_customer.rb +91 -60
  38. data/lib/jamm/api/models/v1_delete_customer_response.rb +42 -35
  39. data/lib/jamm/api/models/v1_deposit_type.rb +14 -15
  40. data/lib/jamm/api/models/v1_error_detail.rb +57 -44
  41. data/lib/jamm/api/models/v1_error_response.rb +46 -38
  42. data/lib/jamm/api/models/v1_error_type.rb +30 -31
  43. data/lib/jamm/api/models/v1_event_type.rb +20 -21
  44. data/lib/jamm/api/models/v1_get_bank_response.rb +42 -35
  45. data/lib/jamm/api/models/v1_get_branch_response.rb +42 -35
  46. data/lib/jamm/api/models/v1_get_branches_response.rb +44 -36
  47. data/lib/jamm/api/models/v1_get_charge_response.rb +51 -40
  48. data/lib/jamm/api/models/v1_get_charges_response.rb +60 -45
  49. data/lib/jamm/api/models/v1_get_contract_response.rb +51 -40
  50. data/lib/jamm/api/models/v1_get_customer_response.rb +42 -35
  51. data/lib/jamm/api/models/v1_get_major_banks_response.rb +59 -44
  52. data/lib/jamm/api/models/v1_initial_charge.rb +61 -48
  53. data/lib/jamm/api/models/v1_kyc_status.rb +16 -17
  54. data/lib/jamm/api/models/v1_merchant.rb +51 -40
  55. data/lib/jamm/api/models/v1_merchant_customer.rb +51 -40
  56. data/lib/jamm/api/models/v1_merchant_webhook_message.rb +75 -57
  57. data/lib/jamm/api/models/v1_message_response.rb +67 -48
  58. data/lib/jamm/api/models/v1_off_session_payment_request.rb +51 -40
  59. data/lib/jamm/api/models/v1_off_session_payment_response.rb +51 -40
  60. data/lib/jamm/api/models/v1_on_session_payment_data.rb +67 -48
  61. data/lib/jamm/api/models/v1_on_session_payment_error.rb +55 -45
  62. data/lib/jamm/api/models/v1_on_session_payment_error_code.rb +21 -22
  63. data/lib/jamm/api/models/v1_on_session_payment_request.rb +67 -48
  64. data/lib/jamm/api/models/v1_on_session_payment_response.rb +59 -44
  65. data/lib/jamm/api/models/v1_pagination.rb +51 -40
  66. data/lib/jamm/api/models/v1_payment_authorization_status.rb +14 -15
  67. data/lib/jamm/api/models/v1_payment_link.rb +57 -44
  68. data/lib/jamm/api/models/v1_ping_response.rb +42 -35
  69. data/lib/jamm/api/models/v1_search_banks_response.rb +44 -36
  70. data/lib/jamm/api/models/v1_search_branches_response.rb +44 -36
  71. data/lib/jamm/api/models/v1_update_customer_response.rb +42 -35
  72. data/lib/jamm/api/models/v1_url.rb +48 -39
  73. data/lib/jamm/api/models/v1_user_account_message.rb +67 -48
  74. data/lib/jamm/api/models/v1_withdraw_request.rb +51 -40
  75. data/lib/jamm/api/models/v1_withdraw_response.rb +51 -40
  76. data/lib/jamm/api/version.rb +11 -11
  77. data/lib/jamm/api.rb +10 -10
  78. data/lib/jamm/charge.rb +12 -0
  79. data/lib/jamm/deprecation.rb +13 -0
  80. data/lib/jamm/payment.rb +61 -0
  81. data/lib/jamm/version.rb +1 -1
  82. data/lib/jamm.rb +2 -0
  83. metadata +4 -2
@@ -1,21 +1,41 @@
1
- # frozen_string_literal: true
2
-
3
- # #Jamm API
4
- #
5
- # No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
- #
7
- # The version of the OpenAPI document: 1.0
8
- #
9
- # Generated by: https://openapi-generator.tech
10
- # Generator version: 7.9.0
11
- #
1
+ =begin
2
+ #Jamm API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
12
 
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Api
17
17
  class Bank
18
- attr_accessor :code, :name, :name_katakana, :name_hiragana, :name_alphabet, :assets, :quota, :opening_hours, :bankpay_scheduled_maintenances, :bank_scheduled_maintenances, :registration_scheduled_maintenances
18
+ attr_accessor :code
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :name_katakana
23
+
24
+ attr_accessor :name_hiragana
25
+
26
+ attr_accessor :name_alphabet
27
+
28
+ attr_accessor :assets
29
+
30
+ attr_accessor :quota
31
+
32
+ attr_accessor :opening_hours
33
+
34
+ attr_accessor :bankpay_scheduled_maintenances
35
+
36
+ attr_accessor :bank_scheduled_maintenances
37
+
38
+ attr_accessor :registration_scheduled_maintenances
19
39
 
20
40
  # True when Bankpay is currently available.
21
41
  attr_accessor :bankpay_available
@@ -32,21 +52,21 @@ module Api
32
52
  # Attribute mapping from ruby-style variable name to JSON key.
33
53
  def self.attribute_map
34
54
  {
35
- :code => :code,
36
- :name => :name,
37
- :name_katakana => :nameKatakana,
38
- :name_hiragana => :nameHiragana,
39
- :name_alphabet => :nameAlphabet,
40
- :assets => :assets,
41
- :quota => :quota,
42
- :opening_hours => :openingHours,
43
- :bankpay_scheduled_maintenances => :bankpayScheduledMaintenances,
44
- :bank_scheduled_maintenances => :bankScheduledMaintenances,
45
- :registration_scheduled_maintenances => :registrationScheduledMaintenances,
46
- :bankpay_available => :bankpayAvailable,
47
- :bank_available => :bankAvailable,
48
- :registration_available => :registrationAvailable,
49
- :operating => :operating
55
+ :'code' => :'code',
56
+ :'name' => :'name',
57
+ :'name_katakana' => :'nameKatakana',
58
+ :'name_hiragana' => :'nameHiragana',
59
+ :'name_alphabet' => :'nameAlphabet',
60
+ :'assets' => :'assets',
61
+ :'quota' => :'quota',
62
+ :'opening_hours' => :'openingHours',
63
+ :'bankpay_scheduled_maintenances' => :'bankpayScheduledMaintenances',
64
+ :'bank_scheduled_maintenances' => :'bankScheduledMaintenances',
65
+ :'registration_scheduled_maintenances' => :'registrationScheduledMaintenances',
66
+ :'bankpay_available' => :'bankpayAvailable',
67
+ :'bank_available' => :'bankAvailable',
68
+ :'registration_available' => :'registrationAvailable',
69
+ :'operating' => :'operating'
50
70
  }
51
71
  end
52
72
 
@@ -58,85 +78,118 @@ module Api
58
78
  # Attribute type mapping.
59
79
  def self.openapi_types
60
80
  {
61
- :code => :String,
62
- :name => :String,
63
- :name_katakana => :String,
64
- :name_hiragana => :String,
65
- :name_alphabet => :String,
66
- :assets => :BankAssets,
67
- :quota => :BankQuota,
68
- :opening_hours => :String,
69
- :bankpay_scheduled_maintenances => :'Array<BankScheduledMaintenancePeriod>',
70
- :bank_scheduled_maintenances => :'Array<BankScheduledMaintenancePeriod>',
71
- :registration_scheduled_maintenances => :'Array<BankScheduledMaintenancePeriod>',
72
- :bankpay_available => :Boolean,
73
- :bank_available => :Boolean,
74
- :registration_available => :Boolean,
75
- :operating => :Boolean
81
+ :'code' => :'String',
82
+ :'name' => :'String',
83
+ :'name_katakana' => :'String',
84
+ :'name_hiragana' => :'String',
85
+ :'name_alphabet' => :'String',
86
+ :'assets' => :'BankAssets',
87
+ :'quota' => :'BankQuota',
88
+ :'opening_hours' => :'String',
89
+ :'bankpay_scheduled_maintenances' => :'Array<BankScheduledMaintenancePeriod>',
90
+ :'bank_scheduled_maintenances' => :'Array<BankScheduledMaintenancePeriod>',
91
+ :'registration_scheduled_maintenances' => :'Array<BankScheduledMaintenancePeriod>',
92
+ :'bankpay_available' => :'Boolean',
93
+ :'bank_available' => :'Boolean',
94
+ :'registration_available' => :'Boolean',
95
+ :'operating' => :'Boolean'
76
96
  }
77
97
  end
78
98
 
79
99
  # List of attributes with nullable: true
80
100
  def self.openapi_nullable
81
- Set.new([])
101
+ Set.new([
102
+ ])
82
103
  end
83
104
 
84
105
  # Initializes the object
85
106
  # @param [Hash] attributes Model attributes in the form of hash
86
107
  def initialize(attributes = {})
87
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Api::Bank` initialize method' unless attributes.is_a?(Hash)
108
+ if (!attributes.is_a?(Hash))
109
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::Bank` initialize method"
110
+ end
88
111
 
89
112
  # check to see if the attribute exists and convert string to symbol for hash key
90
- attributes = attributes.each_with_object({}) do |(k, v), h|
91
- raise ArgumentError, "`#{k}` is not a valid attribute in `Api::Bank`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect unless self.class.attribute_map.key?(k.to_sym)
92
-
113
+ attributes = attributes.each_with_object({}) { |(k, v), h|
114
+ if (!self.class.attribute_map.key?(k.to_sym))
115
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::Bank`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
116
+ end
93
117
  h[k.to_sym] = v
94
- end
95
-
96
- self.code = attributes[:code] if attributes.key?(:code)
118
+ }
97
119
 
98
- self.name = attributes[:name] if attributes.key?(:name)
120
+ if attributes.key?(:'code')
121
+ self.code = attributes[:'code']
122
+ end
99
123
 
100
- self.name_katakana = attributes[:name_katakana] if attributes.key?(:name_katakana)
124
+ if attributes.key?(:'name')
125
+ self.name = attributes[:'name']
126
+ end
101
127
 
102
- self.name_hiragana = attributes[:name_hiragana] if attributes.key?(:name_hiragana)
128
+ if attributes.key?(:'name_katakana')
129
+ self.name_katakana = attributes[:'name_katakana']
130
+ end
103
131
 
104
- self.name_alphabet = attributes[:name_alphabet] if attributes.key?(:name_alphabet)
132
+ if attributes.key?(:'name_hiragana')
133
+ self.name_hiragana = attributes[:'name_hiragana']
134
+ end
105
135
 
106
- self.assets = attributes[:assets] if attributes.key?(:assets)
136
+ if attributes.key?(:'name_alphabet')
137
+ self.name_alphabet = attributes[:'name_alphabet']
138
+ end
107
139
 
108
- self.quota = attributes[:quota] if attributes.key?(:quota)
140
+ if attributes.key?(:'assets')
141
+ self.assets = attributes[:'assets']
142
+ end
109
143
 
110
- self.opening_hours = attributes[:opening_hours] if attributes.key?(:opening_hours)
144
+ if attributes.key?(:'quota')
145
+ self.quota = attributes[:'quota']
146
+ end
111
147
 
112
- if attributes.key?(:bankpay_scheduled_maintenances) && (value = attributes[:bankpay_scheduled_maintenances]).is_a?(Array)
113
- self.bankpay_scheduled_maintenances = value
148
+ if attributes.key?(:'opening_hours')
149
+ self.opening_hours = attributes[:'opening_hours']
114
150
  end
115
151
 
116
- if attributes.key?(:bank_scheduled_maintenances) && (value = attributes[:bank_scheduled_maintenances]).is_a?(Array)
117
- self.bank_scheduled_maintenances = value
152
+ if attributes.key?(:'bankpay_scheduled_maintenances')
153
+ if (value = attributes[:'bankpay_scheduled_maintenances']).is_a?(Array)
154
+ self.bankpay_scheduled_maintenances = value
155
+ end
118
156
  end
119
157
 
120
- if attributes.key?(:registration_scheduled_maintenances) && (value = attributes[:registration_scheduled_maintenances]).is_a?(Array)
121
- self.registration_scheduled_maintenances = value
158
+ if attributes.key?(:'bank_scheduled_maintenances')
159
+ if (value = attributes[:'bank_scheduled_maintenances']).is_a?(Array)
160
+ self.bank_scheduled_maintenances = value
161
+ end
122
162
  end
123
163
 
124
- self.bankpay_available = attributes[:bankpay_available] if attributes.key?(:bankpay_available)
164
+ if attributes.key?(:'registration_scheduled_maintenances')
165
+ if (value = attributes[:'registration_scheduled_maintenances']).is_a?(Array)
166
+ self.registration_scheduled_maintenances = value
167
+ end
168
+ end
125
169
 
126
- self.bank_available = attributes[:bank_available] if attributes.key?(:bank_available)
170
+ if attributes.key?(:'bankpay_available')
171
+ self.bankpay_available = attributes[:'bankpay_available']
172
+ end
127
173
 
128
- self.registration_available = attributes[:registration_available] if attributes.key?(:registration_available)
174
+ if attributes.key?(:'bank_available')
175
+ self.bank_available = attributes[:'bank_available']
176
+ end
129
177
 
130
- return unless attributes.key?(:operating)
178
+ if attributes.key?(:'registration_available')
179
+ self.registration_available = attributes[:'registration_available']
180
+ end
131
181
 
132
- self.operating = attributes[:operating]
182
+ if attributes.key?(:'operating')
183
+ self.operating = attributes[:'operating']
184
+ end
133
185
  end
134
186
 
135
187
  # Show invalid properties with the reasons. Usually used together with valid?
136
188
  # @return Array for valid properties with the reasons
137
189
  def list_invalid_properties
138
190
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
139
- []
191
+ invalid_properties = Array.new
192
+ invalid_properties
140
193
  end
141
194
 
142
195
  # Check to see if the all the properties in the model are valid
@@ -148,31 +201,30 @@ module Api
148
201
 
149
202
  # Checks equality by comparing each attribute.
150
203
  # @param [Object] Object to be compared
151
- def ==(other)
152
- return true if equal?(other)
153
-
154
- self.class == other.class &&
155
- code == other.code &&
156
- name == other.name &&
157
- name_katakana == other.name_katakana &&
158
- name_hiragana == other.name_hiragana &&
159
- name_alphabet == other.name_alphabet &&
160
- assets == other.assets &&
161
- quota == other.quota &&
162
- opening_hours == other.opening_hours &&
163
- bankpay_scheduled_maintenances == other.bankpay_scheduled_maintenances &&
164
- bank_scheduled_maintenances == other.bank_scheduled_maintenances &&
165
- registration_scheduled_maintenances == other.registration_scheduled_maintenances &&
166
- bankpay_available == other.bankpay_available &&
167
- bank_available == other.bank_available &&
168
- registration_available == other.registration_available &&
169
- operating == other.operating
204
+ def ==(o)
205
+ return true if self.equal?(o)
206
+ self.class == o.class &&
207
+ code == o.code &&
208
+ name == o.name &&
209
+ name_katakana == o.name_katakana &&
210
+ name_hiragana == o.name_hiragana &&
211
+ name_alphabet == o.name_alphabet &&
212
+ assets == o.assets &&
213
+ quota == o.quota &&
214
+ opening_hours == o.opening_hours &&
215
+ bankpay_scheduled_maintenances == o.bankpay_scheduled_maintenances &&
216
+ bank_scheduled_maintenances == o.bank_scheduled_maintenances &&
217
+ registration_scheduled_maintenances == o.registration_scheduled_maintenances &&
218
+ bankpay_available == o.bankpay_available &&
219
+ bank_available == o.bank_available &&
220
+ registration_available == o.registration_available &&
221
+ operating == o.operating
170
222
  end
171
223
 
172
224
  # @see the `==` method
173
225
  # @param [Object] Object to be compared
174
- def eql?(other)
175
- self == other
226
+ def eql?(o)
227
+ self == o
176
228
  end
177
229
 
178
230
  # Calculates hash code according to all attributes.
@@ -186,18 +238,19 @@ module Api
186
238
  # @return [Object] Returns the model itself
187
239
  def self.build_from_hash(attributes)
188
240
  return nil unless attributes.is_a?(Hash)
189
-
190
241
  attributes = attributes.transform_keys(&:to_sym)
191
242
  transformed_hash = {}
192
243
  openapi_types.each_pair do |key, type|
193
244
  if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
194
- transformed_hash[key.to_s] = nil
245
+ transformed_hash["#{key}"] = nil
195
246
  elsif type =~ /\AArray<(.*)>/i
196
247
  # check to ensure the input is an array given that the attribute
197
248
  # is documented as an array but the input is not
198
- transformed_hash[key.to_s] = attributes[attribute_map[key]].map { |v| _deserialize(::Regexp.last_match(1), v) } if attributes[attribute_map[key]].is_a?(Array)
249
+ if attributes[attribute_map[key]].is_a?(Array)
250
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
251
+ end
199
252
  elsif !attributes[attribute_map[key]].nil?
200
- transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
253
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
201
254
  end
202
255
  end
203
256
  new(transformed_hash)
@@ -263,7 +316,7 @@ module Api
263
316
  def to_hash
264
317
  hash = {}
265
318
  self.class.attribute_map.each_pair do |attr, param|
266
- value = send(attr)
319
+ value = self.send(attr)
267
320
  if value.nil?
268
321
  is_nullable = self.class.openapi_nullable.include?(attr)
269
322
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -291,5 +344,7 @@ module Api
291
344
  value
292
345
  end
293
346
  end
347
+
294
348
  end
349
+
295
350
  end
@@ -1,14 +1,14 @@
1
- # frozen_string_literal: true
2
-
3
- # #Jamm API
4
- #
5
- # No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
- #
7
- # The version of the OpenAPI document: 1.0
8
- #
9
- # Generated by: https://openapi-generator.tech
10
- # Generator version: 7.9.0
11
- #
1
+ =begin
2
+ #Jamm API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
12
 
13
13
  require 'date'
14
14
  require 'time'
@@ -29,10 +29,10 @@ module Api
29
29
  # Attribute mapping from ruby-style variable name to JSON key.
30
30
  def self.attribute_map
31
31
  {
32
- :bank_code => :bankCode,
33
- :logo_url_large => :logoUrlLarge,
34
- :logo_url_medium => :logoUrlMedium,
35
- :terms_url => :termsUrl
32
+ :'bank_code' => :'bankCode',
33
+ :'logo_url_large' => :'logoUrlLarge',
34
+ :'logo_url_medium' => :'logoUrlMedium',
35
+ :'terms_url' => :'termsUrl'
36
36
  }
37
37
  end
38
38
 
@@ -44,46 +44,57 @@ module Api
44
44
  # Attribute type mapping.
45
45
  def self.openapi_types
46
46
  {
47
- :bank_code => :String,
48
- :logo_url_large => :String,
49
- :logo_url_medium => :String,
50
- :terms_url => :String
47
+ :'bank_code' => :'String',
48
+ :'logo_url_large' => :'String',
49
+ :'logo_url_medium' => :'String',
50
+ :'terms_url' => :'String'
51
51
  }
52
52
  end
53
53
 
54
54
  # List of attributes with nullable: true
55
55
  def self.openapi_nullable
56
- Set.new([])
56
+ Set.new([
57
+ ])
57
58
  end
58
59
 
59
60
  # Initializes the object
60
61
  # @param [Hash] attributes Model attributes in the form of hash
61
62
  def initialize(attributes = {})
62
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Api::BankAssets` initialize method' unless attributes.is_a?(Hash)
63
+ if (!attributes.is_a?(Hash))
64
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::BankAssets` initialize method"
65
+ end
63
66
 
64
67
  # check to see if the attribute exists and convert string to symbol for hash key
65
- attributes = attributes.each_with_object({}) do |(k, v), h|
66
- raise ArgumentError, "`#{k}` is not a valid attribute in `Api::BankAssets`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect unless self.class.attribute_map.key?(k.to_sym)
67
-
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!self.class.attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::BankAssets`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
71
+ end
68
72
  h[k.to_sym] = v
69
- end
70
-
71
- self.bank_code = attributes[:bank_code] if attributes.key?(:bank_code)
73
+ }
72
74
 
73
- self.logo_url_large = attributes[:logo_url_large] if attributes.key?(:logo_url_large)
75
+ if attributes.key?(:'bank_code')
76
+ self.bank_code = attributes[:'bank_code']
77
+ end
74
78
 
75
- self.logo_url_medium = attributes[:logo_url_medium] if attributes.key?(:logo_url_medium)
79
+ if attributes.key?(:'logo_url_large')
80
+ self.logo_url_large = attributes[:'logo_url_large']
81
+ end
76
82
 
77
- return unless attributes.key?(:terms_url)
83
+ if attributes.key?(:'logo_url_medium')
84
+ self.logo_url_medium = attributes[:'logo_url_medium']
85
+ end
78
86
 
79
- self.terms_url = attributes[:terms_url]
87
+ if attributes.key?(:'terms_url')
88
+ self.terms_url = attributes[:'terms_url']
89
+ end
80
90
  end
81
91
 
82
92
  # Show invalid properties with the reasons. Usually used together with valid?
83
93
  # @return Array for valid properties with the reasons
84
94
  def list_invalid_properties
85
95
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
- []
96
+ invalid_properties = Array.new
97
+ invalid_properties
87
98
  end
88
99
 
89
100
  # Check to see if the all the properties in the model are valid
@@ -95,20 +106,19 @@ module Api
95
106
 
96
107
  # Checks equality by comparing each attribute.
97
108
  # @param [Object] Object to be compared
98
- def ==(other)
99
- return true if equal?(other)
100
-
101
- self.class == other.class &&
102
- bank_code == other.bank_code &&
103
- logo_url_large == other.logo_url_large &&
104
- logo_url_medium == other.logo_url_medium &&
105
- terms_url == other.terms_url
109
+ def ==(o)
110
+ return true if self.equal?(o)
111
+ self.class == o.class &&
112
+ bank_code == o.bank_code &&
113
+ logo_url_large == o.logo_url_large &&
114
+ logo_url_medium == o.logo_url_medium &&
115
+ terms_url == o.terms_url
106
116
  end
107
117
 
108
118
  # @see the `==` method
109
119
  # @param [Object] Object to be compared
110
- def eql?(other)
111
- self == other
120
+ def eql?(o)
121
+ self == o
112
122
  end
113
123
 
114
124
  # Calculates hash code according to all attributes.
@@ -122,18 +132,19 @@ module Api
122
132
  # @return [Object] Returns the model itself
123
133
  def self.build_from_hash(attributes)
124
134
  return nil unless attributes.is_a?(Hash)
125
-
126
135
  attributes = attributes.transform_keys(&:to_sym)
127
136
  transformed_hash = {}
128
137
  openapi_types.each_pair do |key, type|
129
138
  if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
130
- transformed_hash[key.to_s] = nil
139
+ transformed_hash["#{key}"] = nil
131
140
  elsif type =~ /\AArray<(.*)>/i
132
141
  # check to ensure the input is an array given that the attribute
133
142
  # is documented as an array but the input is not
134
- transformed_hash[key.to_s] = attributes[attribute_map[key]].map { |v| _deserialize(::Regexp.last_match(1), v) } if attributes[attribute_map[key]].is_a?(Array)
143
+ if attributes[attribute_map[key]].is_a?(Array)
144
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
145
+ end
135
146
  elsif !attributes[attribute_map[key]].nil?
136
- transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
147
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
137
148
  end
138
149
  end
139
150
  new(transformed_hash)
@@ -199,7 +210,7 @@ module Api
199
210
  def to_hash
200
211
  hash = {}
201
212
  self.class.attribute_map.each_pair do |attr, param|
202
- value = send(attr)
213
+ value = self.send(attr)
203
214
  if value.nil?
204
215
  is_nullable = self.class.openapi_nullable.include?(attr)
205
216
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -227,5 +238,7 @@ module Api
227
238
  value
228
239
  end
229
240
  end
241
+
230
242
  end
243
+
231
244
  end