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,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,15 +16,21 @@ require 'time'
16
16
  module Api
17
17
  # Request message for the unified payment interface. The system intelligently routes the request to the appropriate payment method based on the provided parameters.
18
18
  class OnSessionPaymentRequest
19
- attr_accessor :customer, :buyer, :charge, :redirect
19
+ attr_accessor :customer
20
+
21
+ attr_accessor :buyer
22
+
23
+ attr_accessor :charge
24
+
25
+ attr_accessor :redirect
20
26
 
21
27
  # Attribute mapping from ruby-style variable name to JSON key.
22
28
  def self.attribute_map
23
29
  {
24
- :customer => :customer,
25
- :buyer => :buyer,
26
- :charge => :charge,
27
- :redirect => :redirect
30
+ :'customer' => :'customer',
31
+ :'buyer' => :'buyer',
32
+ :'charge' => :'charge',
33
+ :'redirect' => :'redirect'
28
34
  }
29
35
  end
30
36
 
@@ -36,46 +42,57 @@ module Api
36
42
  # Attribute type mapping.
37
43
  def self.openapi_types
38
44
  {
39
- :customer => :String,
40
- :buyer => :Buyer,
41
- :charge => :InitialCharge,
42
- :redirect => :URL
45
+ :'customer' => :'String',
46
+ :'buyer' => :'Buyer',
47
+ :'charge' => :'InitialCharge',
48
+ :'redirect' => :'URL'
43
49
  }
44
50
  end
45
51
 
46
52
  # List of attributes with nullable: true
47
53
  def self.openapi_nullable
48
- Set.new([])
54
+ Set.new([
55
+ ])
49
56
  end
50
57
 
51
58
  # Initializes the object
52
59
  # @param [Hash] attributes Model attributes in the form of hash
53
60
  def initialize(attributes = {})
54
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Api::OnSessionPaymentRequest` initialize method' unless attributes.is_a?(Hash)
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::OnSessionPaymentRequest` initialize method"
63
+ end
55
64
 
56
65
  # check to see if the attribute exists and convert string to symbol for hash key
57
- attributes = attributes.each_with_object({}) do |(k, v), h|
58
- raise ArgumentError, "`#{k}` is not a valid attribute in `Api::OnSessionPaymentRequest`. 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)
59
-
66
+ attributes = attributes.each_with_object({}) { |(k, v), h|
67
+ if (!self.class.attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::OnSessionPaymentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
69
+ end
60
70
  h[k.to_sym] = v
61
- end
62
-
63
- self.customer = attributes[:customer] if attributes.key?(:customer)
71
+ }
64
72
 
65
- self.buyer = attributes[:buyer] if attributes.key?(:buyer)
73
+ if attributes.key?(:'customer')
74
+ self.customer = attributes[:'customer']
75
+ end
66
76
 
67
- self.charge = attributes[:charge] if attributes.key?(:charge)
77
+ if attributes.key?(:'buyer')
78
+ self.buyer = attributes[:'buyer']
79
+ end
68
80
 
69
- return unless attributes.key?(:redirect)
81
+ if attributes.key?(:'charge')
82
+ self.charge = attributes[:'charge']
83
+ end
70
84
 
71
- self.redirect = attributes[:redirect]
85
+ if attributes.key?(:'redirect')
86
+ self.redirect = attributes[:'redirect']
87
+ end
72
88
  end
73
89
 
74
90
  # Show invalid properties with the reasons. Usually used together with valid?
75
91
  # @return Array for valid properties with the reasons
76
92
  def list_invalid_properties
77
93
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
- []
94
+ invalid_properties = Array.new
95
+ invalid_properties
79
96
  end
80
97
 
81
98
  # Check to see if the all the properties in the model are valid
@@ -87,20 +104,19 @@ module Api
87
104
 
88
105
  # Checks equality by comparing each attribute.
89
106
  # @param [Object] Object to be compared
90
- def ==(other)
91
- return true if equal?(other)
92
-
93
- self.class == other.class &&
94
- customer == other.customer &&
95
- buyer == other.buyer &&
96
- charge == other.charge &&
97
- redirect == other.redirect
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ customer == o.customer &&
111
+ buyer == o.buyer &&
112
+ charge == o.charge &&
113
+ redirect == o.redirect
98
114
  end
99
115
 
100
116
  # @see the `==` method
101
117
  # @param [Object] Object to be compared
102
- def eql?(other)
103
- self == other
118
+ def eql?(o)
119
+ self == o
104
120
  end
105
121
 
106
122
  # Calculates hash code according to all attributes.
@@ -114,18 +130,19 @@ module Api
114
130
  # @return [Object] Returns the model itself
115
131
  def self.build_from_hash(attributes)
116
132
  return nil unless attributes.is_a?(Hash)
117
-
118
133
  attributes = attributes.transform_keys(&:to_sym)
119
134
  transformed_hash = {}
120
135
  openapi_types.each_pair do |key, type|
121
136
  if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
122
- transformed_hash[key.to_s] = nil
137
+ transformed_hash["#{key}"] = nil
123
138
  elsif type =~ /\AArray<(.*)>/i
124
139
  # check to ensure the input is an array given that the attribute
125
140
  # is documented as an array but the input is not
126
- 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)
141
+ if attributes[attribute_map[key]].is_a?(Array)
142
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
143
+ end
127
144
  elsif !attributes[attribute_map[key]].nil?
128
- transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
145
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
129
146
  end
130
147
  end
131
148
  new(transformed_hash)
@@ -191,7 +208,7 @@ module Api
191
208
  def to_hash
192
209
  hash = {}
193
210
  self.class.attribute_map.each_pair do |attr, param|
194
- value = send(attr)
211
+ value = self.send(attr)
195
212
  if value.nil?
196
213
  is_nullable = self.class.openapi_nullable.include?(attr)
197
214
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -219,5 +236,7 @@ module Api
219
236
  value
220
237
  end
221
238
  end
239
+
222
240
  end
241
+
223
242
  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'
@@ -16,14 +16,18 @@ require 'time'
16
16
  module Api
17
17
  # Response message for the unified payment interface. Contains a standardized format with success/error pattern for consistent API responses.
18
18
  class OnSessionPaymentResponse
19
- attr_accessor :success, :error, :data
19
+ attr_accessor :success
20
+
21
+ attr_accessor :error
22
+
23
+ attr_accessor :data
20
24
 
21
25
  # Attribute mapping from ruby-style variable name to JSON key.
22
26
  def self.attribute_map
23
27
  {
24
- :success => :success,
25
- :error => :error,
26
- :data => :data
28
+ :'success' => :'success',
29
+ :'error' => :'error',
30
+ :'data' => :'data'
27
31
  }
28
32
  end
29
33
 
@@ -35,43 +39,52 @@ module Api
35
39
  # Attribute type mapping.
36
40
  def self.openapi_types
37
41
  {
38
- :success => :Boolean,
39
- :error => :OnSessionPaymentError,
40
- :data => :OnSessionPaymentData
42
+ :'success' => :'Boolean',
43
+ :'error' => :'OnSessionPaymentError',
44
+ :'data' => :'OnSessionPaymentData'
41
45
  }
42
46
  end
43
47
 
44
48
  # List of attributes with nullable: true
45
49
  def self.openapi_nullable
46
- Set.new([])
50
+ Set.new([
51
+ ])
47
52
  end
48
53
 
49
54
  # Initializes the object
50
55
  # @param [Hash] attributes Model attributes in the form of hash
51
56
  def initialize(attributes = {})
52
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Api::OnSessionPaymentResponse` initialize method' unless attributes.is_a?(Hash)
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::OnSessionPaymentResponse` initialize method"
59
+ end
53
60
 
54
61
  # check to see if the attribute exists and convert string to symbol for hash key
55
- attributes = attributes.each_with_object({}) do |(k, v), h|
56
- raise ArgumentError, "`#{k}` is not a valid attribute in `Api::OnSessionPaymentResponse`. 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)
57
-
62
+ attributes = attributes.each_with_object({}) { |(k, v), h|
63
+ if (!self.class.attribute_map.key?(k.to_sym))
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::OnSessionPaymentResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ end
58
66
  h[k.to_sym] = v
59
- end
60
-
61
- self.success = attributes[:success] if attributes.key?(:success)
67
+ }
62
68
 
63
- self.error = attributes[:error] if attributes.key?(:error)
69
+ if attributes.key?(:'success')
70
+ self.success = attributes[:'success']
71
+ end
64
72
 
65
- return unless attributes.key?(:data)
73
+ if attributes.key?(:'error')
74
+ self.error = attributes[:'error']
75
+ end
66
76
 
67
- self.data = attributes[:data]
77
+ if attributes.key?(:'data')
78
+ self.data = attributes[:'data']
79
+ end
68
80
  end
69
81
 
70
82
  # Show invalid properties with the reasons. Usually used together with valid?
71
83
  # @return Array for valid properties with the reasons
72
84
  def list_invalid_properties
73
85
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
74
- []
86
+ invalid_properties = Array.new
87
+ invalid_properties
75
88
  end
76
89
 
77
90
  # Check to see if the all the properties in the model are valid
@@ -83,19 +96,18 @@ module Api
83
96
 
84
97
  # Checks equality by comparing each attribute.
85
98
  # @param [Object] Object to be compared
86
- def ==(other)
87
- return true if equal?(other)
88
-
89
- self.class == other.class &&
90
- success == other.success &&
91
- error == other.error &&
92
- data == other.data
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ success == o.success &&
103
+ error == o.error &&
104
+ data == o.data
93
105
  end
94
106
 
95
107
  # @see the `==` method
96
108
  # @param [Object] Object to be compared
97
- def eql?(other)
98
- self == other
109
+ def eql?(o)
110
+ self == o
99
111
  end
100
112
 
101
113
  # Calculates hash code according to all attributes.
@@ -109,18 +121,19 @@ module Api
109
121
  # @return [Object] Returns the model itself
110
122
  def self.build_from_hash(attributes)
111
123
  return nil unless attributes.is_a?(Hash)
112
-
113
124
  attributes = attributes.transform_keys(&:to_sym)
114
125
  transformed_hash = {}
115
126
  openapi_types.each_pair do |key, type|
116
127
  if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
117
- transformed_hash[key.to_s] = nil
128
+ transformed_hash["#{key}"] = nil
118
129
  elsif type =~ /\AArray<(.*)>/i
119
130
  # check to ensure the input is an array given that the attribute
120
131
  # 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)
132
+ if attributes[attribute_map[key]].is_a?(Array)
133
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
134
+ end
122
135
  elsif !attributes[attribute_map[key]].nil?
123
- transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
136
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
124
137
  end
125
138
  end
126
139
  new(transformed_hash)
@@ -186,7 +199,7 @@ module Api
186
199
  def to_hash
187
200
  hash = {}
188
201
  self.class.attribute_map.each_pair do |attr, param|
189
- value = send(attr)
202
+ value = self.send(attr)
190
203
  if value.nil?
191
204
  is_nullable = self.class.openapi_nullable.include?(attr)
192
205
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -214,5 +227,7 @@ module Api
214
227
  value
215
228
  end
216
229
  end
230
+
217
231
  end
232
+
218
233
  end
@@ -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 Pagination
18
- attr_accessor :page_size, :page_token
18
+ attr_accessor :page_size
19
+
20
+ attr_accessor :page_token
19
21
 
20
22
  # Attribute mapping from ruby-style variable name to JSON key.
21
23
  def self.attribute_map
22
24
  {
23
- :page_size => :pageSize,
24
- :page_token => :pageToken
25
+ :'page_size' => :'pageSize',
26
+ :'page_token' => :'pageToken'
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
- :page_size => :Integer,
37
- :page_token => :String
38
+ :'page_size' => :'Integer',
39
+ :'page_token' => :'String'
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::Pagination` 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::Pagination` 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::Pagination`. 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::Pagination`. 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.page_size = attributes[:page_size] if attributes.key?(:page_size)
62
+ }
59
63
 
60
- return unless attributes.key?(:page_token)
64
+ if attributes.key?(:'page_size')
65
+ self.page_size = attributes[:'page_size']
66
+ end
61
67
 
62
- self.page_token = attributes[:page_token]
68
+ if attributes.key?(:'page_token')
69
+ self.page_token = attributes[:'page_token']
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
- page_size == other.page_size &&
86
- page_token == other.page_token
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ page_size == o.page_size &&
94
+ page_token == o.page_token
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,23 +1,23 @@
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 PaymentAuthorizationStatus
18
- UNSPECIFIED = 'PAYMENT_AUTHORIZATION_STATUS_UNSPECIFIED'
19
- AUTHORIZED = 'PAYMENT_AUTHORIZATION_STATUS_AUTHORIZED'
20
- NOT_AUTHORIZED = 'PAYMENT_AUTHORIZATION_STATUS_NOT_AUTHORIZED'
18
+ UNSPECIFIED = "PAYMENT_AUTHORIZATION_STATUS_UNSPECIFIED".freeze
19
+ AUTHORIZED = "PAYMENT_AUTHORIZATION_STATUS_AUTHORIZED".freeze
20
+ NOT_AUTHORIZED = "PAYMENT_AUTHORIZATION_STATUS_NOT_AUTHORIZED".freeze
21
21
 
22
22
  def self.all_vars
23
23
  @all_vars ||= [UNSPECIFIED, AUTHORIZED, NOT_AUTHORIZED].freeze
@@ -35,7 +35,6 @@ module Api
35
35
  # @return [String] The enum value
36
36
  def build_from_hash(value)
37
37
  return value if PaymentAuthorizationStatus.all_vars.include?(value)
38
-
39
38
  raise "Invalid ENUM value #{value} for class #PaymentAuthorizationStatus"
40
39
  end
41
40
  end