jamm 1.2.2 → 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 (84) 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 +91 -19
  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 +238 -0
  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 +350 -0
  18. data/lib/jamm/api/models/v1_bank_assets.rb +244 -0
  19. data/lib/jamm/api/models/v1_bank_branch.rb +259 -0
  20. data/lib/jamm/api/models/v1_bank_information.rb +71 -51
  21. data/lib/jamm/api/models/v1_bank_quota.rb +278 -0
  22. data/lib/jamm/api/models/v1_bank_scheduled_maintenance_period.rb +250 -0
  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 +233 -0
  41. data/lib/jamm/api/models/v1_error_response.rb +238 -0
  42. data/lib/jamm/api/models/v1_error_type.rb +57 -0
  43. data/lib/jamm/api/models/v1_event_type.rb +20 -21
  44. data/lib/jamm/api/models/{v1_error.rb → v1_get_bank_response.rb} +45 -48
  45. data/lib/jamm/api/models/v1_get_branch_response.rb +214 -0
  46. data/lib/jamm/api/models/v1_get_branches_response.rb +216 -0
  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 +232 -0
  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 +216 -0
  70. data/lib/jamm/api/models/v1_search_branches_response.rb +216 -0
  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 +25 -11
  78. data/lib/jamm/charge.rb +12 -0
  79. data/lib/jamm/deprecation.rb +13 -0
  80. data/lib/jamm/errors.rb +27 -1
  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 +19 -3
@@ -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,21 @@ require 'time'
16
16
  module Api
17
17
  # UpdateCustomerRequest is the request to update a customer. We strongly recommend to call this endpoint when you need to update the customer's information for better experience on our dashboard and customer support. UpdateCustomerRequest はCustomerを更新するためのリクエストです。 加盟店の管理画面でより良い体験を提供し、カスタマーサポートを向上させるため、ストアの顧客情報が変更されたら 当エンドポイントを呼び出すことを推奨します。
18
18
  class CustomerServiceUpdateCustomerBody
19
- attr_accessor :email, :force_kyc, :name, :katakana_last_name, :katakana_first_name, :address, :birth_date, :gender
19
+ attr_accessor :email
20
+
21
+ attr_accessor :force_kyc
22
+
23
+ attr_accessor :name
24
+
25
+ attr_accessor :katakana_last_name
26
+
27
+ attr_accessor :katakana_first_name
28
+
29
+ attr_accessor :address
30
+
31
+ attr_accessor :birth_date
32
+
33
+ attr_accessor :gender
20
34
 
21
35
  # Arbitrary key-value additional information about the customer. All the existing metadata will be overwritten by the new metadata. Customerに関する任意のキーと値の追加情報。 すべての既存のメタデータは新しいメタデータで上書きされます。
22
36
  attr_accessor :metadata
@@ -24,15 +38,15 @@ module Api
24
38
  # Attribute mapping from ruby-style variable name to JSON key.
25
39
  def self.attribute_map
26
40
  {
27
- :email => :email,
28
- :force_kyc => :forceKyc,
29
- :name => :name,
30
- :katakana_last_name => :katakanaLastName,
31
- :katakana_first_name => :katakanaFirstName,
32
- :address => :address,
33
- :birth_date => :birthDate,
34
- :gender => :gender,
35
- :metadata => :metadata
41
+ :'email' => :'email',
42
+ :'force_kyc' => :'forceKyc',
43
+ :'name' => :'name',
44
+ :'katakana_last_name' => :'katakanaLastName',
45
+ :'katakana_first_name' => :'katakanaFirstName',
46
+ :'address' => :'address',
47
+ :'birth_date' => :'birthDate',
48
+ :'gender' => :'gender',
49
+ :'metadata' => :'metadata'
36
50
  }
37
51
  end
38
52
 
@@ -44,62 +58,84 @@ module Api
44
58
  # Attribute type mapping.
45
59
  def self.openapi_types
46
60
  {
47
- :email => :String,
48
- :force_kyc => :Boolean,
49
- :name => :String,
50
- :katakana_last_name => :String,
51
- :katakana_first_name => :String,
52
- :address => :String,
53
- :birth_date => :String,
54
- :gender => :String,
55
- :metadata => :'Hash<String, String>'
61
+ :'email' => :'String',
62
+ :'force_kyc' => :'Boolean',
63
+ :'name' => :'String',
64
+ :'katakana_last_name' => :'String',
65
+ :'katakana_first_name' => :'String',
66
+ :'address' => :'String',
67
+ :'birth_date' => :'String',
68
+ :'gender' => :'String',
69
+ :'metadata' => :'Hash<String, String>'
56
70
  }
57
71
  end
58
72
 
59
73
  # List of attributes with nullable: true
60
74
  def self.openapi_nullable
61
- Set.new([])
75
+ Set.new([
76
+ ])
62
77
  end
63
78
 
64
79
  # Initializes the object
65
80
  # @param [Hash] attributes Model attributes in the form of hash
66
81
  def initialize(attributes = {})
67
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Api::CustomerServiceUpdateCustomerBody` initialize method' unless attributes.is_a?(Hash)
82
+ if (!attributes.is_a?(Hash))
83
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::CustomerServiceUpdateCustomerBody` initialize method"
84
+ end
68
85
 
69
86
  # check to see if the attribute exists and convert string to symbol for hash key
70
- attributes = attributes.each_with_object({}) do |(k, v), h|
71
- raise ArgumentError, "`#{k}` is not a valid attribute in `Api::CustomerServiceUpdateCustomerBody`. 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)
72
-
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!self.class.attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::CustomerServiceUpdateCustomerBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
90
+ end
73
91
  h[k.to_sym] = v
74
- end
75
-
76
- self.email = attributes[:email] if attributes.key?(:email)
92
+ }
77
93
 
78
- self.force_kyc = attributes[:force_kyc] if attributes.key?(:force_kyc)
94
+ if attributes.key?(:'email')
95
+ self.email = attributes[:'email']
96
+ end
79
97
 
80
- self.name = attributes[:name] if attributes.key?(:name)
98
+ if attributes.key?(:'force_kyc')
99
+ self.force_kyc = attributes[:'force_kyc']
100
+ end
81
101
 
82
- self.katakana_last_name = attributes[:katakana_last_name] if attributes.key?(:katakana_last_name)
102
+ if attributes.key?(:'name')
103
+ self.name = attributes[:'name']
104
+ end
83
105
 
84
- self.katakana_first_name = attributes[:katakana_first_name] if attributes.key?(:katakana_first_name)
106
+ if attributes.key?(:'katakana_last_name')
107
+ self.katakana_last_name = attributes[:'katakana_last_name']
108
+ end
85
109
 
86
- self.address = attributes[:address] if attributes.key?(:address)
110
+ if attributes.key?(:'katakana_first_name')
111
+ self.katakana_first_name = attributes[:'katakana_first_name']
112
+ end
87
113
 
88
- self.birth_date = attributes[:birth_date] if attributes.key?(:birth_date)
114
+ if attributes.key?(:'address')
115
+ self.address = attributes[:'address']
116
+ end
89
117
 
90
- self.gender = attributes[:gender] if attributes.key?(:gender)
118
+ if attributes.key?(:'birth_date')
119
+ self.birth_date = attributes[:'birth_date']
120
+ end
91
121
 
92
- return unless attributes.key?(:metadata)
93
- return unless (value = attributes[:metadata]).is_a?(Hash)
122
+ if attributes.key?(:'gender')
123
+ self.gender = attributes[:'gender']
124
+ end
94
125
 
95
- self.metadata = value
126
+ if attributes.key?(:'metadata')
127
+ if (value = attributes[:'metadata']).is_a?(Hash)
128
+ self.metadata = value
129
+ end
130
+ end
96
131
  end
97
132
 
98
133
  # Show invalid properties with the reasons. Usually used together with valid?
99
134
  # @return Array for valid properties with the reasons
100
135
  def list_invalid_properties
101
136
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
102
- []
137
+ invalid_properties = Array.new
138
+ invalid_properties
103
139
  end
104
140
 
105
141
  # Check to see if the all the properties in the model are valid
@@ -111,25 +147,24 @@ module Api
111
147
 
112
148
  # Checks equality by comparing each attribute.
113
149
  # @param [Object] Object to be compared
114
- def ==(other)
115
- return true if equal?(other)
116
-
117
- self.class == other.class &&
118
- email == other.email &&
119
- force_kyc == other.force_kyc &&
120
- name == other.name &&
121
- katakana_last_name == other.katakana_last_name &&
122
- katakana_first_name == other.katakana_first_name &&
123
- address == other.address &&
124
- birth_date == other.birth_date &&
125
- gender == other.gender &&
126
- metadata == other.metadata
150
+ def ==(o)
151
+ return true if self.equal?(o)
152
+ self.class == o.class &&
153
+ email == o.email &&
154
+ force_kyc == o.force_kyc &&
155
+ name == o.name &&
156
+ katakana_last_name == o.katakana_last_name &&
157
+ katakana_first_name == o.katakana_first_name &&
158
+ address == o.address &&
159
+ birth_date == o.birth_date &&
160
+ gender == o.gender &&
161
+ metadata == o.metadata
127
162
  end
128
163
 
129
164
  # @see the `==` method
130
165
  # @param [Object] Object to be compared
131
- def eql?(other)
132
- self == other
166
+ def eql?(o)
167
+ self == o
133
168
  end
134
169
 
135
170
  # Calculates hash code according to all attributes.
@@ -143,18 +178,19 @@ module Api
143
178
  # @return [Object] Returns the model itself
144
179
  def self.build_from_hash(attributes)
145
180
  return nil unless attributes.is_a?(Hash)
146
-
147
181
  attributes = attributes.transform_keys(&:to_sym)
148
182
  transformed_hash = {}
149
183
  openapi_types.each_pair do |key, type|
150
184
  if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
151
- transformed_hash[key.to_s] = nil
185
+ transformed_hash["#{key}"] = nil
152
186
  elsif type =~ /\AArray<(.*)>/i
153
187
  # check to ensure the input is an array given that the attribute
154
188
  # is documented as an array but the input is not
155
- 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)
189
+ if attributes[attribute_map[key]].is_a?(Array)
190
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
191
+ end
156
192
  elsif !attributes[attribute_map[key]].nil?
157
- transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
193
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
158
194
  end
159
195
  end
160
196
  new(transformed_hash)
@@ -220,7 +256,7 @@ module Api
220
256
  def to_hash
221
257
  hash = {}
222
258
  self.class.attribute_map.each_pair do |attr, param|
223
- value = send(attr)
259
+ value = self.send(attr)
224
260
  if value.nil?
225
261
  is_nullable = self.class.openapi_nullable.include?(attr)
226
262
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -248,5 +284,7 @@ module Api
248
284
  value
249
285
  end
250
286
  end
287
+
251
288
  end
289
+
252
290
  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 GooglerpcStatus
18
- attr_accessor :code, :message, :details
18
+ attr_accessor :code
19
+
20
+ attr_accessor :message
21
+
22
+ attr_accessor :details
19
23
 
20
24
  # Attribute mapping from ruby-style variable name to JSON key.
21
25
  def self.attribute_map
22
26
  {
23
- :code => :code,
24
- :message => :message,
25
- :details => :details
27
+ :'code' => :'code',
28
+ :'message' => :'message',
29
+ :'details' => :'details'
26
30
  }
27
31
  end
28
32
 
@@ -34,44 +38,54 @@ module Api
34
38
  # Attribute type mapping.
35
39
  def self.openapi_types
36
40
  {
37
- :code => :Integer,
38
- :message => :String,
39
- :details => :'Array<ProtobufAny>'
41
+ :'code' => :'Integer',
42
+ :'message' => :'String',
43
+ :'details' => :'Array<ProtobufAny>'
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::GooglerpcStatus` 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::GooglerpcStatus` 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::GooglerpcStatus`. 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::GooglerpcStatus`. 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.code = attributes[:code] if attributes.key?(:code)
66
+ }
61
67
 
62
- self.message = attributes[:message] if attributes.key?(:message)
68
+ if attributes.key?(:'code')
69
+ self.code = attributes[:'code']
70
+ end
63
71
 
64
- return unless attributes.key?(:details)
65
- return unless (value = attributes[:details]).is_a?(Array)
72
+ if attributes.key?(:'message')
73
+ self.message = attributes[:'message']
74
+ end
66
75
 
67
- self.details = value
76
+ if attributes.key?(:'details')
77
+ if (value = attributes[:'details']).is_a?(Array)
78
+ self.details = value
79
+ end
80
+ end
68
81
  end
69
82
 
70
83
  # Show invalid properties with the reasons. Usually used together with valid?
71
84
  # @return Array for valid properties with the reasons
72
85
  def list_invalid_properties
73
86
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
74
- []
87
+ invalid_properties = Array.new
88
+ invalid_properties
75
89
  end
76
90
 
77
91
  # Check to see if the all the properties in the model are valid
@@ -83,19 +97,18 @@ module Api
83
97
 
84
98
  # Checks equality by comparing each attribute.
85
99
  # @param [Object] Object to be compared
86
- def ==(other)
87
- return true if equal?(other)
88
-
89
- self.class == other.class &&
90
- code == other.code &&
91
- message == other.message &&
92
- details == other.details
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ code == o.code &&
104
+ message == o.message &&
105
+ details == o.details
93
106
  end
94
107
 
95
108
  # @see the `==` method
96
109
  # @param [Object] Object to be compared
97
- def eql?(other)
98
- self == other
110
+ def eql?(o)
111
+ self == o
99
112
  end
100
113
 
101
114
  # Calculates hash code according to all attributes.
@@ -109,18 +122,19 @@ module Api
109
122
  # @return [Object] Returns the model itself
110
123
  def self.build_from_hash(attributes)
111
124
  return nil unless attributes.is_a?(Hash)
112
-
113
125
  attributes = attributes.transform_keys(&:to_sym)
114
126
  transformed_hash = {}
115
127
  openapi_types.each_pair do |key, type|
116
128
  if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
117
- transformed_hash[key.to_s] = nil
129
+ transformed_hash["#{key}"] = nil
118
130
  elsif type =~ /\AArray<(.*)>/i
119
131
  # check to ensure the input is an array given that the attribute
120
132
  # is documented as an array but the input is not
121
- 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)
133
+ if attributes[attribute_map[key]].is_a?(Array)
134
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
135
+ end
122
136
  elsif !attributes[attribute_map[key]].nil?
123
- transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
137
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
124
138
  end
125
139
  end
126
140
  new(transformed_hash)
@@ -186,7 +200,7 @@ module Api
186
200
  def to_hash
187
201
  hash = {}
188
202
  self.class.attribute_map.each_pair do |attr, param|
189
- value = send(attr)
203
+ value = self.send(attr)
190
204
  if value.nil?
191
205
  is_nullable = self.class.openapi_nullable.include?(attr)
192
206
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -214,5 +228,7 @@ module Api
214
228
  value
215
229
  end
216
230
  end
231
+
217
232
  end
233
+
218
234
  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'
@@ -22,7 +22,7 @@ module Api
22
22
  # Attribute mapping from ruby-style variable name to JSON key.
23
23
  def self.attribute_map
24
24
  {
25
- :type => :'@type'
25
+ :'type' => :'@type'
26
26
  }
27
27
  end
28
28
 
@@ -34,37 +34,42 @@ module Api
34
34
  # Attribute type mapping.
35
35
  def self.openapi_types
36
36
  {
37
- :type => :String
37
+ :'type' => :'String'
38
38
  }
39
39
  end
40
40
 
41
41
  # List of attributes with nullable: true
42
42
  def self.openapi_nullable
43
- Set.new([])
43
+ Set.new([
44
+ ])
44
45
  end
45
46
 
46
47
  # Initializes the object
47
48
  # @param [Hash] attributes Model attributes in the form of hash
48
49
  def initialize(attributes = {})
49
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Api::ProtobufAny` initialize method' unless attributes.is_a?(Hash)
50
+ if (!attributes.is_a?(Hash))
51
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::ProtobufAny` initialize method"
52
+ end
50
53
 
51
54
  # 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::ProtobufAny`. 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
-
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::ProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
+ end
55
59
  h[k.to_sym] = v
56
- end
57
-
58
- return unless attributes.key?(:type)
60
+ }
59
61
 
60
- self.type = attributes[:type]
62
+ if attributes.key?(:'type')
63
+ self.type = attributes[:'type']
64
+ end
61
65
  end
62
66
 
63
67
  # Show invalid properties with the reasons. Usually used together with valid?
64
68
  # @return Array for valid properties with the reasons
65
69
  def list_invalid_properties
66
70
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
67
- []
71
+ invalid_properties = Array.new
72
+ invalid_properties
68
73
  end
69
74
 
70
75
  # Check to see if the all the properties in the model are valid
@@ -76,17 +81,16 @@ module Api
76
81
 
77
82
  # Checks equality by comparing each attribute.
78
83
  # @param [Object] Object to be compared
79
- def ==(other)
80
- return true if equal?(other)
81
-
82
- self.class == other.class &&
83
- type == other.type
84
+ def ==(o)
85
+ return true if self.equal?(o)
86
+ self.class == o.class &&
87
+ type == o.type
84
88
  end
85
89
 
86
90
  # @see the `==` method
87
91
  # @param [Object] Object to be compared
88
- def eql?(other)
89
- self == other
92
+ def eql?(o)
93
+ self == o
90
94
  end
91
95
 
92
96
  # Calculates hash code according to all attributes.
@@ -100,18 +104,19 @@ module Api
100
104
  # @return [Object] Returns the model itself
101
105
  def self.build_from_hash(attributes)
102
106
  return nil unless attributes.is_a?(Hash)
103
-
104
107
  attributes = attributes.transform_keys(&:to_sym)
105
108
  transformed_hash = {}
106
109
  openapi_types.each_pair do |key, type|
107
110
  if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
108
- transformed_hash[key.to_s] = nil
111
+ transformed_hash["#{key}"] = nil
109
112
  elsif type =~ /\AArray<(.*)>/i
110
113
  # check to ensure the input is an array given that the attribute
111
114
  # is documented as an array but the input is not
112
- 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)
115
+ if attributes[attribute_map[key]].is_a?(Array)
116
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
117
+ end
113
118
  elsif !attributes[attribute_map[key]].nil?
114
- transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
119
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
115
120
  end
116
121
  end
117
122
  new(transformed_hash)
@@ -177,7 +182,7 @@ module Api
177
182
  def to_hash
178
183
  hash = {}
179
184
  self.class.attribute_map.each_pair do |attr, param|
180
- value = send(attr)
185
+ value = self.send(attr)
181
186
  if value.nil?
182
187
  is_nullable = self.class.openapi_nullable.include?(attr)
183
188
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -205,5 +210,7 @@ module Api
205
210
  value
206
211
  end
207
212
  end
213
+
208
214
  end
215
+
209
216
  end