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,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'
@@ -16,7 +16,7 @@ require 'time'
16
16
  module Api
17
17
  # Contains the result of a charge operation.
18
18
  class ChargeResult
19
- attr_accessor :charge_id, :description, :merchant_name, :initial_amount, :discount, :final_amount, :amount_refunded, :currency, :token_id, :metadata, :created_at, :updated_at, :processed_at
19
+ attr_accessor :charge_id
20
20
 
21
21
  # True when charged.
22
22
  attr_accessor :paid
@@ -24,24 +24,48 @@ module Api
24
24
  # Reason contains enum status in string. Merchant should not write any code depending on the reason, because Jamm may update the reason at any time.
25
25
  attr_accessor :reason
26
26
 
27
+ attr_accessor :description
28
+
29
+ attr_accessor :merchant_name
30
+
31
+ attr_accessor :initial_amount
32
+
33
+ attr_accessor :discount
34
+
35
+ attr_accessor :final_amount
36
+
37
+ attr_accessor :amount_refunded
38
+
39
+ attr_accessor :currency
40
+
41
+ attr_accessor :token_id
42
+
43
+ attr_accessor :metadata
44
+
45
+ attr_accessor :created_at
46
+
47
+ attr_accessor :updated_at
48
+
49
+ attr_accessor :processed_at
50
+
27
51
  # Attribute mapping from ruby-style variable name to JSON key.
28
52
  def self.attribute_map
29
53
  {
30
- :charge_id => :chargeId,
31
- :paid => :paid,
32
- :reason => :reason,
33
- :description => :description,
34
- :merchant_name => :merchantName,
35
- :initial_amount => :initialAmount,
36
- :discount => :discount,
37
- :final_amount => :finalAmount,
38
- :amount_refunded => :amountRefunded,
39
- :currency => :currency,
40
- :token_id => :tokenId,
41
- :metadata => :metadata,
42
- :created_at => :createdAt,
43
- :updated_at => :updatedAt,
44
- :processed_at => :processedAt
54
+ :'charge_id' => :'chargeId',
55
+ :'paid' => :'paid',
56
+ :'reason' => :'reason',
57
+ :'description' => :'description',
58
+ :'merchant_name' => :'merchantName',
59
+ :'initial_amount' => :'initialAmount',
60
+ :'discount' => :'discount',
61
+ :'final_amount' => :'finalAmount',
62
+ :'amount_refunded' => :'amountRefunded',
63
+ :'currency' => :'currency',
64
+ :'token_id' => :'tokenId',
65
+ :'metadata' => :'metadata',
66
+ :'created_at' => :'createdAt',
67
+ :'updated_at' => :'updatedAt',
68
+ :'processed_at' => :'processedAt'
45
69
  }
46
70
  end
47
71
 
@@ -53,81 +77,114 @@ module Api
53
77
  # Attribute type mapping.
54
78
  def self.openapi_types
55
79
  {
56
- :charge_id => :String,
57
- :paid => :Boolean,
58
- :reason => :String,
59
- :description => :String,
60
- :merchant_name => :String,
61
- :initial_amount => :Integer,
62
- :discount => :Integer,
63
- :final_amount => :Integer,
64
- :amount_refunded => :Integer,
65
- :currency => :String,
66
- :token_id => :String,
67
- :metadata => :'Hash<String, String>',
68
- :created_at => :Time,
69
- :updated_at => :Time,
70
- :processed_at => :Time
80
+ :'charge_id' => :'String',
81
+ :'paid' => :'Boolean',
82
+ :'reason' => :'String',
83
+ :'description' => :'String',
84
+ :'merchant_name' => :'String',
85
+ :'initial_amount' => :'Integer',
86
+ :'discount' => :'Integer',
87
+ :'final_amount' => :'Integer',
88
+ :'amount_refunded' => :'Integer',
89
+ :'currency' => :'String',
90
+ :'token_id' => :'String',
91
+ :'metadata' => :'Hash<String, String>',
92
+ :'created_at' => :'Time',
93
+ :'updated_at' => :'Time',
94
+ :'processed_at' => :'Time'
71
95
  }
72
96
  end
73
97
 
74
98
  # List of attributes with nullable: true
75
99
  def self.openapi_nullable
76
- Set.new([])
100
+ Set.new([
101
+ ])
77
102
  end
78
103
 
79
104
  # Initializes the object
80
105
  # @param [Hash] attributes Model attributes in the form of hash
81
106
  def initialize(attributes = {})
82
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Api::ChargeResult` initialize method' unless attributes.is_a?(Hash)
107
+ if (!attributes.is_a?(Hash))
108
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::ChargeResult` initialize method"
109
+ end
83
110
 
84
111
  # check to see if the attribute exists and convert string to symbol for hash key
85
- attributes = attributes.each_with_object({}) do |(k, v), h|
86
- raise ArgumentError, "`#{k}` is not a valid attribute in `Api::ChargeResult`. 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)
87
-
112
+ attributes = attributes.each_with_object({}) { |(k, v), h|
113
+ if (!self.class.attribute_map.key?(k.to_sym))
114
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::ChargeResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
115
+ end
88
116
  h[k.to_sym] = v
89
- end
90
-
91
- self.charge_id = attributes[:charge_id] if attributes.key?(:charge_id)
117
+ }
92
118
 
93
- self.paid = attributes[:paid] if attributes.key?(:paid)
119
+ if attributes.key?(:'charge_id')
120
+ self.charge_id = attributes[:'charge_id']
121
+ end
94
122
 
95
- self.reason = attributes[:reason] if attributes.key?(:reason)
123
+ if attributes.key?(:'paid')
124
+ self.paid = attributes[:'paid']
125
+ end
96
126
 
97
- self.description = attributes[:description] if attributes.key?(:description)
127
+ if attributes.key?(:'reason')
128
+ self.reason = attributes[:'reason']
129
+ end
98
130
 
99
- self.merchant_name = attributes[:merchant_name] if attributes.key?(:merchant_name)
131
+ if attributes.key?(:'description')
132
+ self.description = attributes[:'description']
133
+ end
100
134
 
101
- self.initial_amount = attributes[:initial_amount] if attributes.key?(:initial_amount)
135
+ if attributes.key?(:'merchant_name')
136
+ self.merchant_name = attributes[:'merchant_name']
137
+ end
102
138
 
103
- self.discount = attributes[:discount] if attributes.key?(:discount)
139
+ if attributes.key?(:'initial_amount')
140
+ self.initial_amount = attributes[:'initial_amount']
141
+ end
104
142
 
105
- self.final_amount = attributes[:final_amount] if attributes.key?(:final_amount)
143
+ if attributes.key?(:'discount')
144
+ self.discount = attributes[:'discount']
145
+ end
106
146
 
107
- self.amount_refunded = attributes[:amount_refunded] if attributes.key?(:amount_refunded)
147
+ if attributes.key?(:'final_amount')
148
+ self.final_amount = attributes[:'final_amount']
149
+ end
108
150
 
109
- self.currency = attributes[:currency] if attributes.key?(:currency)
151
+ if attributes.key?(:'amount_refunded')
152
+ self.amount_refunded = attributes[:'amount_refunded']
153
+ end
110
154
 
111
- self.token_id = attributes[:token_id] if attributes.key?(:token_id)
155
+ if attributes.key?(:'currency')
156
+ self.currency = attributes[:'currency']
157
+ end
112
158
 
113
- if attributes.key?(:metadata) && (value = attributes[:metadata]).is_a?(Hash)
114
- self.metadata = value
159
+ if attributes.key?(:'token_id')
160
+ self.token_id = attributes[:'token_id']
115
161
  end
116
162
 
117
- self.created_at = attributes[:created_at] if attributes.key?(:created_at)
163
+ if attributes.key?(:'metadata')
164
+ if (value = attributes[:'metadata']).is_a?(Hash)
165
+ self.metadata = value
166
+ end
167
+ end
118
168
 
119
- self.updated_at = attributes[:updated_at] if attributes.key?(:updated_at)
169
+ if attributes.key?(:'created_at')
170
+ self.created_at = attributes[:'created_at']
171
+ end
120
172
 
121
- return unless attributes.key?(:processed_at)
173
+ if attributes.key?(:'updated_at')
174
+ self.updated_at = attributes[:'updated_at']
175
+ end
122
176
 
123
- self.processed_at = attributes[:processed_at]
177
+ if attributes.key?(:'processed_at')
178
+ self.processed_at = attributes[:'processed_at']
179
+ end
124
180
  end
125
181
 
126
182
  # Show invalid properties with the reasons. Usually used together with valid?
127
183
  # @return Array for valid properties with the reasons
128
184
  def list_invalid_properties
129
185
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
130
- []
186
+ invalid_properties = Array.new
187
+ invalid_properties
131
188
  end
132
189
 
133
190
  # Check to see if the all the properties in the model are valid
@@ -139,31 +196,30 @@ module Api
139
196
 
140
197
  # Checks equality by comparing each attribute.
141
198
  # @param [Object] Object to be compared
142
- def ==(other)
143
- return true if equal?(other)
144
-
145
- self.class == other.class &&
146
- charge_id == other.charge_id &&
147
- paid == other.paid &&
148
- reason == other.reason &&
149
- description == other.description &&
150
- merchant_name == other.merchant_name &&
151
- initial_amount == other.initial_amount &&
152
- discount == other.discount &&
153
- final_amount == other.final_amount &&
154
- amount_refunded == other.amount_refunded &&
155
- currency == other.currency &&
156
- token_id == other.token_id &&
157
- metadata == other.metadata &&
158
- created_at == other.created_at &&
159
- updated_at == other.updated_at &&
160
- processed_at == other.processed_at
199
+ def ==(o)
200
+ return true if self.equal?(o)
201
+ self.class == o.class &&
202
+ charge_id == o.charge_id &&
203
+ paid == o.paid &&
204
+ reason == o.reason &&
205
+ description == o.description &&
206
+ merchant_name == o.merchant_name &&
207
+ initial_amount == o.initial_amount &&
208
+ discount == o.discount &&
209
+ final_amount == o.final_amount &&
210
+ amount_refunded == o.amount_refunded &&
211
+ currency == o.currency &&
212
+ token_id == o.token_id &&
213
+ metadata == o.metadata &&
214
+ created_at == o.created_at &&
215
+ updated_at == o.updated_at &&
216
+ processed_at == o.processed_at
161
217
  end
162
218
 
163
219
  # @see the `==` method
164
220
  # @param [Object] Object to be compared
165
- def eql?(other)
166
- self == other
221
+ def eql?(o)
222
+ self == o
167
223
  end
168
224
 
169
225
  # Calculates hash code according to all attributes.
@@ -177,18 +233,19 @@ module Api
177
233
  # @return [Object] Returns the model itself
178
234
  def self.build_from_hash(attributes)
179
235
  return nil unless attributes.is_a?(Hash)
180
-
181
236
  attributes = attributes.transform_keys(&:to_sym)
182
237
  transformed_hash = {}
183
238
  openapi_types.each_pair do |key, type|
184
239
  if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
185
- transformed_hash[key.to_s] = nil
240
+ transformed_hash["#{key}"] = nil
186
241
  elsif type =~ /\AArray<(.*)>/i
187
242
  # check to ensure the input is an array given that the attribute
188
243
  # is documented as an array but the input is not
189
- 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)
244
+ if attributes[attribute_map[key]].is_a?(Array)
245
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
246
+ end
190
247
  elsif !attributes[attribute_map[key]].nil?
191
- transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
248
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
192
249
  end
193
250
  end
194
251
  new(transformed_hash)
@@ -254,7 +311,7 @@ module Api
254
311
  def to_hash
255
312
  hash = {}
256
313
  self.class.attribute_map.each_pair do |attr, param|
257
- value = send(attr)
314
+ value = self.send(attr)
258
315
  if value.nil?
259
316
  is_nullable = self.class.openapi_nullable.include?(attr)
260
317
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -282,5 +339,7 @@ module Api
282
339
  value
283
340
  end
284
341
  end
342
+
285
343
  end
344
+
286
345
  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'
@@ -28,7 +28,8 @@ module Api
28
28
  attr_accessor :updated_at
29
29
 
30
30
  class EnumAttributeValidator
31
- attr_reader :datatype, :allowable_values
31
+ attr_reader :datatype
32
+ attr_reader :allowable_values
32
33
 
33
34
  def initialize(datatype, allowable_values)
34
35
  @allowable_values = allowable_values.map do |value|
@@ -51,10 +52,10 @@ module Api
51
52
  # Attribute mapping from ruby-style variable name to JSON key.
52
53
  def self.attribute_map
53
54
  {
54
- :id => :id,
55
- :status => :status,
56
- :created_at => :createdAt,
57
- :updated_at => :updatedAt
55
+ :'id' => :'id',
56
+ :'status' => :'status',
57
+ :'created_at' => :'createdAt',
58
+ :'updated_at' => :'updatedAt'
58
59
  }
59
60
  end
60
61
 
@@ -66,50 +67,59 @@ module Api
66
67
  # Attribute type mapping.
67
68
  def self.openapi_types
68
69
  {
69
- :id => :String,
70
- :status => :ContractStatus,
71
- :created_at => :Time,
72
- :updated_at => :Time
70
+ :'id' => :'String',
71
+ :'status' => :'ContractStatus',
72
+ :'created_at' => :'Time',
73
+ :'updated_at' => :'Time'
73
74
  }
74
75
  end
75
76
 
76
77
  # List of attributes with nullable: true
77
78
  def self.openapi_nullable
78
- Set.new([])
79
+ Set.new([
80
+ ])
79
81
  end
80
82
 
81
83
  # Initializes the object
82
84
  # @param [Hash] attributes Model attributes in the form of hash
83
85
  def initialize(attributes = {})
84
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Api::Contract` initialize method' unless attributes.is_a?(Hash)
86
+ if (!attributes.is_a?(Hash))
87
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::Contract` initialize method"
88
+ end
85
89
 
86
90
  # check to see if the attribute exists and convert string to symbol for hash key
87
- attributes = attributes.each_with_object({}) do |(k, v), h|
88
- raise ArgumentError, "`#{k}` is not a valid attribute in `Api::Contract`. 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)
89
-
91
+ attributes = attributes.each_with_object({}) { |(k, v), h|
92
+ if (!self.class.attribute_map.key?(k.to_sym))
93
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::Contract`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
94
+ end
90
95
  h[k.to_sym] = v
91
- end
92
-
93
- self.id = attributes[:id] if attributes.key?(:id)
96
+ }
94
97
 
95
- self.status = if attributes.key?(:status)
96
- attributes[:status]
97
- else
98
- 'CONTRACT_STATUS_UNSPECIFIED'
99
- end
98
+ if attributes.key?(:'id')
99
+ self.id = attributes[:'id']
100
+ end
100
101
 
101
- self.created_at = attributes[:created_at] if attributes.key?(:created_at)
102
+ if attributes.key?(:'status')
103
+ self.status = attributes[:'status']
104
+ else
105
+ self.status = 'CONTRACT_STATUS_UNSPECIFIED'
106
+ end
102
107
 
103
- return unless attributes.key?(:updated_at)
108
+ if attributes.key?(:'created_at')
109
+ self.created_at = attributes[:'created_at']
110
+ end
104
111
 
105
- self.updated_at = attributes[:updated_at]
112
+ if attributes.key?(:'updated_at')
113
+ self.updated_at = attributes[:'updated_at']
114
+ end
106
115
  end
107
116
 
108
117
  # Show invalid properties with the reasons. Usually used together with valid?
109
118
  # @return Array for valid properties with the reasons
110
119
  def list_invalid_properties
111
120
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
112
- []
121
+ invalid_properties = Array.new
122
+ invalid_properties
113
123
  end
114
124
 
115
125
  # Check to see if the all the properties in the model are valid
@@ -121,20 +131,19 @@ module Api
121
131
 
122
132
  # Checks equality by comparing each attribute.
123
133
  # @param [Object] Object to be compared
124
- def ==(other)
125
- return true if equal?(other)
126
-
127
- self.class == other.class &&
128
- id == other.id &&
129
- status == other.status &&
130
- created_at == other.created_at &&
131
- updated_at == other.updated_at
134
+ def ==(o)
135
+ return true if self.equal?(o)
136
+ self.class == o.class &&
137
+ id == o.id &&
138
+ status == o.status &&
139
+ created_at == o.created_at &&
140
+ updated_at == o.updated_at
132
141
  end
133
142
 
134
143
  # @see the `==` method
135
144
  # @param [Object] Object to be compared
136
- def eql?(other)
137
- self == other
145
+ def eql?(o)
146
+ self == o
138
147
  end
139
148
 
140
149
  # Calculates hash code according to all attributes.
@@ -148,18 +157,19 @@ module Api
148
157
  # @return [Object] Returns the model itself
149
158
  def self.build_from_hash(attributes)
150
159
  return nil unless attributes.is_a?(Hash)
151
-
152
160
  attributes = attributes.transform_keys(&:to_sym)
153
161
  transformed_hash = {}
154
162
  openapi_types.each_pair do |key, type|
155
163
  if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
156
- transformed_hash[key.to_s] = nil
164
+ transformed_hash["#{key}"] = nil
157
165
  elsif type =~ /\AArray<(.*)>/i
158
166
  # check to ensure the input is an array given that the attribute
159
167
  # is documented as an array but the input is not
160
- 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)
168
+ if attributes[attribute_map[key]].is_a?(Array)
169
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
170
+ end
161
171
  elsif !attributes[attribute_map[key]].nil?
162
- transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
172
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
163
173
  end
164
174
  end
165
175
  new(transformed_hash)
@@ -225,7 +235,7 @@ module Api
225
235
  def to_hash
226
236
  hash = {}
227
237
  self.class.attribute_map.each_pair do |attr, param|
228
- value = send(attr)
238
+ value = self.send(attr)
229
239
  if value.nil?
230
240
  is_nullable = self.class.openapi_nullable.include?(attr)
231
241
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -253,5 +263,7 @@ module Api
253
263
  value
254
264
  end
255
265
  end
266
+
256
267
  end
268
+
257
269
  end