jamm 1.3.0 → 1.4.1

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 (84) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/jamm.gemspec +1 -1
  4. data/lib/jamm/api/api/customer_api.rb +82 -52
  5. data/lib/jamm/api/api/healthcheck_api.rb +18 -15
  6. data/lib/jamm/api/api/payment_api.rb +113 -62
  7. data/lib/jamm/api/api/webhook_service_api.rb +41 -28
  8. data/lib/jamm/api/api_client.rb +74 -66
  9. data/lib/jamm/api/api_error.rb +16 -16
  10. data/lib/jamm/api/configuration.rb +42 -34
  11. data/lib/jamm/api/models/apiv1_error.rb +56 -44
  12. data/lib/jamm/api/models/apiv1_status.rb +57 -47
  13. data/lib/jamm/api/models/customer_service_update_customer_body.rb +107 -69
  14. data/lib/jamm/api/models/googlerpc_status.rb +61 -45
  15. data/lib/jamm/api/models/protobuf_any.rb +42 -35
  16. data/lib/jamm/api/models/v1_add_charge_request.rb +59 -44
  17. data/lib/jamm/api/models/v1_add_charge_response.rb +59 -44
  18. data/lib/jamm/api/models/v1_bank.rb +150 -95
  19. data/lib/jamm/api/models/v1_bank_assets.rb +60 -47
  20. data/lib/jamm/api/models/v1_bank_branch.rb +83 -56
  21. data/lib/jamm/api/models/v1_bank_information.rb +71 -51
  22. data/lib/jamm/api/models/v1_bank_quota.rb +99 -64
  23. data/lib/jamm/api/models/v1_bank_scheduled_maintenance_period.rb +75 -52
  24. data/lib/jamm/api/models/v1_buyer.rb +104 -76
  25. data/lib/jamm/api/models/v1_charge.rb +67 -52
  26. data/lib/jamm/api/models/v1_charge_message.rb +151 -93
  27. data/lib/jamm/api/models/v1_charge_message_status.rb +17 -18
  28. data/lib/jamm/api/models/v1_charge_result.rb +152 -93
  29. data/lib/jamm/api/models/v1_contract.rb +64 -52
  30. data/lib/jamm/api/models/v1_contract_message.rb +67 -48
  31. data/lib/jamm/api/models/v1_contract_status.rb +20 -21
  32. data/lib/jamm/api/models/v1_create_contract_with_charge_request.rb +59 -44
  33. data/lib/jamm/api/models/v1_create_contract_with_charge_response.rb +67 -48
  34. data/lib/jamm/api/models/v1_create_contract_without_charge_request.rb +51 -40
  35. data/lib/jamm/api/models/v1_create_contract_without_charge_response.rb +59 -44
  36. data/lib/jamm/api/models/v1_create_customer_request.rb +42 -35
  37. data/lib/jamm/api/models/v1_create_customer_response.rb +42 -35
  38. data/lib/jamm/api/models/v1_customer.rb +91 -60
  39. data/lib/jamm/api/models/v1_delete_customer_response.rb +42 -35
  40. data/lib/jamm/api/models/v1_deposit_type.rb +14 -15
  41. data/lib/jamm/api/models/v1_error_detail.rb +57 -44
  42. data/lib/jamm/api/models/v1_error_response.rb +46 -38
  43. data/lib/jamm/api/models/v1_error_type.rb +30 -31
  44. data/lib/jamm/api/models/v1_event_type.rb +20 -21
  45. data/lib/jamm/api/models/v1_get_bank_response.rb +42 -35
  46. data/lib/jamm/api/models/v1_get_branch_response.rb +42 -35
  47. data/lib/jamm/api/models/v1_get_branches_response.rb +44 -36
  48. data/lib/jamm/api/models/v1_get_charge_response.rb +51 -40
  49. data/lib/jamm/api/models/v1_get_charges_response.rb +60 -45
  50. data/lib/jamm/api/models/v1_get_contract_response.rb +51 -40
  51. data/lib/jamm/api/models/v1_get_customer_response.rb +42 -35
  52. data/lib/jamm/api/models/v1_get_major_banks_response.rb +59 -44
  53. data/lib/jamm/api/models/v1_initial_charge.rb +61 -48
  54. data/lib/jamm/api/models/v1_kyc_status.rb +16 -17
  55. data/lib/jamm/api/models/v1_merchant.rb +51 -40
  56. data/lib/jamm/api/models/v1_merchant_customer.rb +51 -40
  57. data/lib/jamm/api/models/v1_merchant_webhook_message.rb +75 -57
  58. data/lib/jamm/api/models/v1_message_response.rb +67 -48
  59. data/lib/jamm/api/models/v1_off_session_payment_request.rb +51 -40
  60. data/lib/jamm/api/models/v1_off_session_payment_response.rb +51 -40
  61. data/lib/jamm/api/models/v1_on_session_payment_data.rb +67 -48
  62. data/lib/jamm/api/models/v1_on_session_payment_error.rb +55 -45
  63. data/lib/jamm/api/models/v1_on_session_payment_error_code.rb +21 -22
  64. data/lib/jamm/api/models/v1_on_session_payment_request.rb +67 -48
  65. data/lib/jamm/api/models/v1_on_session_payment_response.rb +59 -44
  66. data/lib/jamm/api/models/v1_pagination.rb +51 -40
  67. data/lib/jamm/api/models/v1_payment_authorization_status.rb +14 -15
  68. data/lib/jamm/api/models/v1_payment_link.rb +57 -44
  69. data/lib/jamm/api/models/v1_ping_response.rb +42 -35
  70. data/lib/jamm/api/models/v1_search_banks_response.rb +44 -36
  71. data/lib/jamm/api/models/v1_search_branches_response.rb +44 -36
  72. data/lib/jamm/api/models/v1_update_customer_response.rb +42 -35
  73. data/lib/jamm/api/models/v1_url.rb +48 -39
  74. data/lib/jamm/api/models/v1_user_account_message.rb +67 -48
  75. data/lib/jamm/api/models/v1_withdraw_request.rb +51 -40
  76. data/lib/jamm/api/models/v1_withdraw_response.rb +51 -40
  77. data/lib/jamm/api/version.rb +11 -11
  78. data/lib/jamm/api.rb +10 -10
  79. data/lib/jamm/charge.rb +12 -0
  80. data/lib/jamm/deprecation.rb +13 -0
  81. data/lib/jamm/payment.rb +61 -0
  82. data/lib/jamm/version.rb +1 -1
  83. data/lib/jamm.rb +2 -0
  84. metadata +5 -3
@@ -1,27 +1,29 @@
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 GetContractResponse
18
- attr_accessor :customer, :contract
18
+ attr_accessor :customer
19
+
20
+ attr_accessor :contract
19
21
 
20
22
  # Attribute mapping from ruby-style variable name to JSON key.
21
23
  def self.attribute_map
22
24
  {
23
- :customer => :customer,
24
- :contract => :contract
25
+ :'customer' => :'customer',
26
+ :'contract' => :'contract'
25
27
  }
26
28
  end
27
29
 
@@ -33,40 +35,47 @@ module Api
33
35
  # Attribute type mapping.
34
36
  def self.openapi_types
35
37
  {
36
- :customer => :MerchantCustomer,
37
- :contract => :Contract
38
+ :'customer' => :'MerchantCustomer',
39
+ :'contract' => :'Contract'
38
40
  }
39
41
  end
40
42
 
41
43
  # List of attributes with nullable: true
42
44
  def self.openapi_nullable
43
- Set.new([])
45
+ Set.new([
46
+ ])
44
47
  end
45
48
 
46
49
  # Initializes the object
47
50
  # @param [Hash] attributes Model attributes in the form of hash
48
51
  def initialize(attributes = {})
49
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Api::GetContractResponse` initialize method' unless attributes.is_a?(Hash)
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::GetContractResponse` initialize method"
54
+ end
50
55
 
51
56
  # check to see if the attribute exists and convert string to symbol for hash key
52
- attributes = attributes.each_with_object({}) do |(k, v), h|
53
- raise ArgumentError, "`#{k}` is not a valid attribute in `Api::GetContractResponse`. 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)
54
-
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::GetContractResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
55
61
  h[k.to_sym] = v
56
- end
57
-
58
- self.customer = attributes[:customer] if attributes.key?(:customer)
62
+ }
59
63
 
60
- return unless attributes.key?(:contract)
64
+ if attributes.key?(:'customer')
65
+ self.customer = attributes[:'customer']
66
+ end
61
67
 
62
- self.contract = attributes[:contract]
68
+ if attributes.key?(:'contract')
69
+ self.contract = attributes[:'contract']
70
+ end
63
71
  end
64
72
 
65
73
  # Show invalid properties with the reasons. Usually used together with valid?
66
74
  # @return Array for valid properties with the reasons
67
75
  def list_invalid_properties
68
76
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
69
- []
77
+ invalid_properties = Array.new
78
+ invalid_properties
70
79
  end
71
80
 
72
81
  # Check to see if the all the properties in the model are valid
@@ -78,18 +87,17 @@ module Api
78
87
 
79
88
  # Checks equality by comparing each attribute.
80
89
  # @param [Object] Object to be compared
81
- def ==(other)
82
- return true if equal?(other)
83
-
84
- self.class == other.class &&
85
- customer == other.customer &&
86
- contract == other.contract
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ customer == o.customer &&
94
+ contract == o.contract
87
95
  end
88
96
 
89
97
  # @see the `==` method
90
98
  # @param [Object] Object to be compared
91
- def eql?(other)
92
- self == other
99
+ def eql?(o)
100
+ self == o
93
101
  end
94
102
 
95
103
  # Calculates hash code according to all attributes.
@@ -103,18 +111,19 @@ module Api
103
111
  # @return [Object] Returns the model itself
104
112
  def self.build_from_hash(attributes)
105
113
  return nil unless attributes.is_a?(Hash)
106
-
107
114
  attributes = attributes.transform_keys(&:to_sym)
108
115
  transformed_hash = {}
109
116
  openapi_types.each_pair do |key, type|
110
117
  if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
111
- transformed_hash[key.to_s] = nil
118
+ transformed_hash["#{key}"] = nil
112
119
  elsif type =~ /\AArray<(.*)>/i
113
120
  # check to ensure the input is an array given that the attribute
114
121
  # is documented as an array but the input is not
115
- 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)
122
+ if attributes[attribute_map[key]].is_a?(Array)
123
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
124
+ end
116
125
  elsif !attributes[attribute_map[key]].nil?
117
- transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
126
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
118
127
  end
119
128
  end
120
129
  new(transformed_hash)
@@ -180,7 +189,7 @@ module Api
180
189
  def to_hash
181
190
  hash = {}
182
191
  self.class.attribute_map.each_pair do |attr, param|
183
- value = send(attr)
192
+ value = self.send(attr)
184
193
  if value.nil?
185
194
  is_nullable = self.class.openapi_nullable.include?(attr)
186
195
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -208,5 +217,7 @@ module Api
208
217
  value
209
218
  end
210
219
  end
220
+
211
221
  end
222
+
212
223
  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'
@@ -20,7 +20,7 @@ module Api
20
20
  # Attribute mapping from ruby-style variable name to JSON key.
21
21
  def self.attribute_map
22
22
  {
23
- :customer => :customer
23
+ :'customer' => :'customer'
24
24
  }
25
25
  end
26
26
 
@@ -32,37 +32,42 @@ module Api
32
32
  # Attribute type mapping.
33
33
  def self.openapi_types
34
34
  {
35
- :customer => :Customer
35
+ :'customer' => :'Customer'
36
36
  }
37
37
  end
38
38
 
39
39
  # List of attributes with nullable: true
40
40
  def self.openapi_nullable
41
- Set.new([])
41
+ Set.new([
42
+ ])
42
43
  end
43
44
 
44
45
  # Initializes the object
45
46
  # @param [Hash] attributes Model attributes in the form of hash
46
47
  def initialize(attributes = {})
47
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Api::GetCustomerResponse` initialize method' unless attributes.is_a?(Hash)
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::GetCustomerResponse` initialize method"
50
+ end
48
51
 
49
52
  # check to see if the attribute exists and convert string to symbol for hash key
50
- attributes = attributes.each_with_object({}) do |(k, v), h|
51
- raise ArgumentError, "`#{k}` is not a valid attribute in `Api::GetCustomerResponse`. 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)
52
-
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::GetCustomerResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
53
57
  h[k.to_sym] = v
54
- end
55
-
56
- return unless attributes.key?(:customer)
58
+ }
57
59
 
58
- self.customer = attributes[:customer]
60
+ if attributes.key?(:'customer')
61
+ self.customer = attributes[:'customer']
62
+ end
59
63
  end
60
64
 
61
65
  # Show invalid properties with the reasons. Usually used together with valid?
62
66
  # @return Array for valid properties with the reasons
63
67
  def list_invalid_properties
64
68
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
65
- []
69
+ invalid_properties = Array.new
70
+ invalid_properties
66
71
  end
67
72
 
68
73
  # Check to see if the all the properties in the model are valid
@@ -74,17 +79,16 @@ module Api
74
79
 
75
80
  # Checks equality by comparing each attribute.
76
81
  # @param [Object] Object to be compared
77
- def ==(other)
78
- return true if equal?(other)
79
-
80
- self.class == other.class &&
81
- customer == other.customer
82
+ def ==(o)
83
+ return true if self.equal?(o)
84
+ self.class == o.class &&
85
+ customer == o.customer
82
86
  end
83
87
 
84
88
  # @see the `==` method
85
89
  # @param [Object] Object to be compared
86
- def eql?(other)
87
- self == other
90
+ def eql?(o)
91
+ self == o
88
92
  end
89
93
 
90
94
  # Calculates hash code according to all attributes.
@@ -98,18 +102,19 @@ module Api
98
102
  # @return [Object] Returns the model itself
99
103
  def self.build_from_hash(attributes)
100
104
  return nil unless attributes.is_a?(Hash)
101
-
102
105
  attributes = attributes.transform_keys(&:to_sym)
103
106
  transformed_hash = {}
104
107
  openapi_types.each_pair do |key, type|
105
108
  if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
106
- transformed_hash[key.to_s] = nil
109
+ transformed_hash["#{key}"] = nil
107
110
  elsif type =~ /\AArray<(.*)>/i
108
111
  # check to ensure the input is an array given that the attribute
109
112
  # is documented as an array but the input is not
110
- 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)
113
+ if attributes[attribute_map[key]].is_a?(Array)
114
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
115
+ end
111
116
  elsif !attributes[attribute_map[key]].nil?
112
- transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
117
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
113
118
  end
114
119
  end
115
120
  new(transformed_hash)
@@ -175,7 +180,7 @@ module Api
175
180
  def to_hash
176
181
  hash = {}
177
182
  self.class.attribute_map.each_pair do |attr, param|
178
- value = send(attr)
183
+ value = self.send(attr)
179
184
  if value.nil?
180
185
  is_nullable = self.class.openapi_nullable.include?(attr)
181
186
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -203,5 +208,7 @@ module Api
203
208
  value
204
209
  end
205
210
  end
211
+
206
212
  end
213
+
207
214
  end
@@ -1,28 +1,32 @@
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 GetMajorBanksResponse
18
- attr_accessor :mizuho, :mufg, :smbc
18
+ attr_accessor :mizuho
19
+
20
+ attr_accessor :mufg
21
+
22
+ attr_accessor :smbc
19
23
 
20
24
  # Attribute mapping from ruby-style variable name to JSON key.
21
25
  def self.attribute_map
22
26
  {
23
- :mizuho => :mizuho,
24
- :mufg => :mufg,
25
- :smbc => :smbc
27
+ :'mizuho' => :'mizuho',
28
+ :'mufg' => :'mufg',
29
+ :'smbc' => :'smbc'
26
30
  }
27
31
  end
28
32
 
@@ -34,43 +38,52 @@ module Api
34
38
  # Attribute type mapping.
35
39
  def self.openapi_types
36
40
  {
37
- :mizuho => :Bank,
38
- :mufg => :Bank,
39
- :smbc => :Bank
41
+ :'mizuho' => :'Bank',
42
+ :'mufg' => :'Bank',
43
+ :'smbc' => :'Bank'
40
44
  }
41
45
  end
42
46
 
43
47
  # List of attributes with nullable: true
44
48
  def self.openapi_nullable
45
- Set.new([])
49
+ Set.new([
50
+ ])
46
51
  end
47
52
 
48
53
  # Initializes the object
49
54
  # @param [Hash] attributes Model attributes in the form of hash
50
55
  def initialize(attributes = {})
51
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Api::GetMajorBanksResponse` initialize method' unless attributes.is_a?(Hash)
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::GetMajorBanksResponse` initialize method"
58
+ end
52
59
 
53
60
  # check to see if the attribute exists and convert string to symbol for hash key
54
- attributes = attributes.each_with_object({}) do |(k, v), h|
55
- raise ArgumentError, "`#{k}` is not a valid attribute in `Api::GetMajorBanksResponse`. 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)
56
-
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::GetMajorBanksResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
57
65
  h[k.to_sym] = v
58
- end
59
-
60
- self.mizuho = attributes[:mizuho] if attributes.key?(:mizuho)
66
+ }
61
67
 
62
- self.mufg = attributes[:mufg] if attributes.key?(:mufg)
68
+ if attributes.key?(:'mizuho')
69
+ self.mizuho = attributes[:'mizuho']
70
+ end
63
71
 
64
- return unless attributes.key?(:smbc)
72
+ if attributes.key?(:'mufg')
73
+ self.mufg = attributes[:'mufg']
74
+ end
65
75
 
66
- self.smbc = attributes[:smbc]
76
+ if attributes.key?(:'smbc')
77
+ self.smbc = attributes[:'smbc']
78
+ end
67
79
  end
68
80
 
69
81
  # Show invalid properties with the reasons. Usually used together with valid?
70
82
  # @return Array for valid properties with the reasons
71
83
  def list_invalid_properties
72
84
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
73
- []
85
+ invalid_properties = Array.new
86
+ invalid_properties
74
87
  end
75
88
 
76
89
  # Check to see if the all the properties in the model are valid
@@ -82,19 +95,18 @@ module Api
82
95
 
83
96
  # Checks equality by comparing each attribute.
84
97
  # @param [Object] Object to be compared
85
- def ==(other)
86
- return true if equal?(other)
87
-
88
- self.class == other.class &&
89
- mizuho == other.mizuho &&
90
- mufg == other.mufg &&
91
- smbc == other.smbc
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ mizuho == o.mizuho &&
102
+ mufg == o.mufg &&
103
+ smbc == o.smbc
92
104
  end
93
105
 
94
106
  # @see the `==` method
95
107
  # @param [Object] Object to be compared
96
- def eql?(other)
97
- self == other
108
+ def eql?(o)
109
+ self == o
98
110
  end
99
111
 
100
112
  # Calculates hash code according to all attributes.
@@ -108,18 +120,19 @@ module Api
108
120
  # @return [Object] Returns the model itself
109
121
  def self.build_from_hash(attributes)
110
122
  return nil unless attributes.is_a?(Hash)
111
-
112
123
  attributes = attributes.transform_keys(&:to_sym)
113
124
  transformed_hash = {}
114
125
  openapi_types.each_pair do |key, type|
115
126
  if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
116
- transformed_hash[key.to_s] = nil
127
+ transformed_hash["#{key}"] = nil
117
128
  elsif type =~ /\AArray<(.*)>/i
118
129
  # check to ensure the input is an array given that the attribute
119
130
  # is documented as an array but the input is not
120
- 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)
131
+ if attributes[attribute_map[key]].is_a?(Array)
132
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
133
+ end
121
134
  elsif !attributes[attribute_map[key]].nil?
122
- transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
135
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
123
136
  end
124
137
  end
125
138
  new(transformed_hash)
@@ -185,7 +198,7 @@ module Api
185
198
  def to_hash
186
199
  hash = {}
187
200
  self.class.attribute_map.each_pair do |attr, param|
188
- value = send(attr)
201
+ value = self.send(attr)
189
202
  if value.nil?
190
203
  is_nullable = self.class.openapi_nullable.include?(attr)
191
204
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -213,5 +226,7 @@ module Api
213
226
  value
214
227
  end
215
228
  end
229
+
216
230
  end
231
+
217
232
  end