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,13 +16,15 @@ require 'time'
16
16
  module Api
17
17
  # This message represents the response after processing an OffSessionPaymentRequest. It contains information about the created charge, customer details and the payment result.
18
18
  class OffSessionPaymentResponse
19
- attr_accessor :customer, :charge
19
+ attr_accessor :customer
20
+
21
+ attr_accessor :charge
20
22
 
21
23
  # Attribute mapping from ruby-style variable name to JSON key.
22
24
  def self.attribute_map
23
25
  {
24
- :customer => :customer,
25
- :charge => :charge
26
+ :'customer' => :'customer',
27
+ :'charge' => :'charge'
26
28
  }
27
29
  end
28
30
 
@@ -34,40 +36,47 @@ module Api
34
36
  # Attribute type mapping.
35
37
  def self.openapi_types
36
38
  {
37
- :customer => :Customer,
38
- :charge => :ChargeResult
39
+ :'customer' => :'Customer',
40
+ :'charge' => :'ChargeResult'
39
41
  }
40
42
  end
41
43
 
42
44
  # List of attributes with nullable: true
43
45
  def self.openapi_nullable
44
- Set.new([])
46
+ Set.new([
47
+ ])
45
48
  end
46
49
 
47
50
  # Initializes the object
48
51
  # @param [Hash] attributes Model attributes in the form of hash
49
52
  def initialize(attributes = {})
50
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Api::OffSessionPaymentResponse` initialize method' unless attributes.is_a?(Hash)
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::OffSessionPaymentResponse` initialize method"
55
+ end
51
56
 
52
57
  # check to see if the attribute exists and convert string to symbol for hash key
53
- attributes = attributes.each_with_object({}) do |(k, v), h|
54
- raise ArgumentError, "`#{k}` is not a valid attribute in `Api::OffSessionPaymentResponse`. 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)
55
-
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::OffSessionPaymentResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ end
56
62
  h[k.to_sym] = v
57
- end
58
-
59
- self.customer = attributes[:customer] if attributes.key?(:customer)
63
+ }
60
64
 
61
- return unless attributes.key?(:charge)
65
+ if attributes.key?(:'customer')
66
+ self.customer = attributes[:'customer']
67
+ end
62
68
 
63
- self.charge = attributes[:charge]
69
+ if attributes.key?(:'charge')
70
+ self.charge = attributes[:'charge']
71
+ end
64
72
  end
65
73
 
66
74
  # Show invalid properties with the reasons. Usually used together with valid?
67
75
  # @return Array for valid properties with the reasons
68
76
  def list_invalid_properties
69
77
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
70
- []
78
+ invalid_properties = Array.new
79
+ invalid_properties
71
80
  end
72
81
 
73
82
  # Check to see if the all the properties in the model are valid
@@ -79,18 +88,17 @@ module Api
79
88
 
80
89
  # Checks equality by comparing each attribute.
81
90
  # @param [Object] Object to be compared
82
- def ==(other)
83
- return true if equal?(other)
84
-
85
- self.class == other.class &&
86
- customer == other.customer &&
87
- charge == other.charge
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ customer == o.customer &&
95
+ charge == o.charge
88
96
  end
89
97
 
90
98
  # @see the `==` method
91
99
  # @param [Object] Object to be compared
92
- def eql?(other)
93
- self == other
100
+ def eql?(o)
101
+ self == o
94
102
  end
95
103
 
96
104
  # Calculates hash code according to all attributes.
@@ -104,18 +112,19 @@ module Api
104
112
  # @return [Object] Returns the model itself
105
113
  def self.build_from_hash(attributes)
106
114
  return nil unless attributes.is_a?(Hash)
107
-
108
115
  attributes = attributes.transform_keys(&:to_sym)
109
116
  transformed_hash = {}
110
117
  openapi_types.each_pair do |key, type|
111
118
  if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
112
- transformed_hash[key.to_s] = nil
119
+ transformed_hash["#{key}"] = nil
113
120
  elsif type =~ /\AArray<(.*)>/i
114
121
  # check to ensure the input is an array given that the attribute
115
122
  # is documented as an array but the input is not
116
- 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)
123
+ if attributes[attribute_map[key]].is_a?(Array)
124
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
125
+ end
117
126
  elsif !attributes[attribute_map[key]].nil?
118
- transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
127
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
119
128
  end
120
129
  end
121
130
  new(transformed_hash)
@@ -181,7 +190,7 @@ module Api
181
190
  def to_hash
182
191
  hash = {}
183
192
  self.class.attribute_map.each_pair do |attr, param|
184
- value = send(attr)
193
+ value = self.send(attr)
185
194
  if value.nil?
186
195
  is_nullable = self.class.openapi_nullable.include?(attr)
187
196
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -209,5 +218,7 @@ module Api
209
218
  value
210
219
  end
211
220
  end
221
+
212
222
  end
223
+
213
224
  end
@@ -1,29 +1,35 @@
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 OnSessionPaymentData
18
- attr_accessor :contract, :charge, :customer, :payment_link
18
+ attr_accessor :contract
19
+
20
+ attr_accessor :charge
21
+
22
+ attr_accessor :customer
23
+
24
+ attr_accessor :payment_link
19
25
 
20
26
  # Attribute mapping from ruby-style variable name to JSON key.
21
27
  def self.attribute_map
22
28
  {
23
- :contract => :contract,
24
- :charge => :charge,
25
- :customer => :customer,
26
- :payment_link => :paymentLink
29
+ :'contract' => :'contract',
30
+ :'charge' => :'charge',
31
+ :'customer' => :'customer',
32
+ :'payment_link' => :'paymentLink'
27
33
  }
28
34
  end
29
35
 
@@ -35,46 +41,57 @@ module Api
35
41
  # Attribute type mapping.
36
42
  def self.openapi_types
37
43
  {
38
- :contract => :Contract,
39
- :charge => :Charge,
40
- :customer => :Customer,
41
- :payment_link => :PaymentLink
44
+ :'contract' => :'Contract',
45
+ :'charge' => :'Charge',
46
+ :'customer' => :'Customer',
47
+ :'payment_link' => :'PaymentLink'
42
48
  }
43
49
  end
44
50
 
45
51
  # List of attributes with nullable: true
46
52
  def self.openapi_nullable
47
- Set.new([])
53
+ Set.new([
54
+ ])
48
55
  end
49
56
 
50
57
  # Initializes the object
51
58
  # @param [Hash] attributes Model attributes in the form of hash
52
59
  def initialize(attributes = {})
53
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Api::OnSessionPaymentData` initialize method' unless attributes.is_a?(Hash)
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::OnSessionPaymentData` initialize method"
62
+ end
54
63
 
55
64
  # check to see if the attribute exists and convert string to symbol for hash key
56
- attributes = attributes.each_with_object({}) do |(k, v), h|
57
- raise ArgumentError, "`#{k}` is not a valid attribute in `Api::OnSessionPaymentData`. 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)
58
-
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::OnSessionPaymentData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
59
69
  h[k.to_sym] = v
60
- end
61
-
62
- self.contract = attributes[:contract] if attributes.key?(:contract)
70
+ }
63
71
 
64
- self.charge = attributes[:charge] if attributes.key?(:charge)
72
+ if attributes.key?(:'contract')
73
+ self.contract = attributes[:'contract']
74
+ end
65
75
 
66
- self.customer = attributes[:customer] if attributes.key?(:customer)
76
+ if attributes.key?(:'charge')
77
+ self.charge = attributes[:'charge']
78
+ end
67
79
 
68
- return unless attributes.key?(:payment_link)
80
+ if attributes.key?(:'customer')
81
+ self.customer = attributes[:'customer']
82
+ end
69
83
 
70
- self.payment_link = attributes[:payment_link]
84
+ if attributes.key?(:'payment_link')
85
+ self.payment_link = attributes[:'payment_link']
86
+ end
71
87
  end
72
88
 
73
89
  # Show invalid properties with the reasons. Usually used together with valid?
74
90
  # @return Array for valid properties with the reasons
75
91
  def list_invalid_properties
76
92
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
- []
93
+ invalid_properties = Array.new
94
+ invalid_properties
78
95
  end
79
96
 
80
97
  # Check to see if the all the properties in the model are valid
@@ -86,20 +103,19 @@ module Api
86
103
 
87
104
  # Checks equality by comparing each attribute.
88
105
  # @param [Object] Object to be compared
89
- def ==(other)
90
- return true if equal?(other)
91
-
92
- self.class == other.class &&
93
- contract == other.contract &&
94
- charge == other.charge &&
95
- customer == other.customer &&
96
- payment_link == other.payment_link
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ contract == o.contract &&
110
+ charge == o.charge &&
111
+ customer == o.customer &&
112
+ payment_link == o.payment_link
97
113
  end
98
114
 
99
115
  # @see the `==` method
100
116
  # @param [Object] Object to be compared
101
- def eql?(other)
102
- self == other
117
+ def eql?(o)
118
+ self == o
103
119
  end
104
120
 
105
121
  # Calculates hash code according to all attributes.
@@ -113,18 +129,19 @@ module Api
113
129
  # @return [Object] Returns the model itself
114
130
  def self.build_from_hash(attributes)
115
131
  return nil unless attributes.is_a?(Hash)
116
-
117
132
  attributes = attributes.transform_keys(&:to_sym)
118
133
  transformed_hash = {}
119
134
  openapi_types.each_pair do |key, type|
120
135
  if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
121
- transformed_hash[key.to_s] = nil
136
+ transformed_hash["#{key}"] = nil
122
137
  elsif type =~ /\AArray<(.*)>/i
123
138
  # check to ensure the input is an array given that the attribute
124
139
  # is documented as an array but the input is not
125
- 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)
140
+ if attributes[attribute_map[key]].is_a?(Array)
141
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
142
+ end
126
143
  elsif !attributes[attribute_map[key]].nil?
127
- transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
144
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
128
145
  end
129
146
  end
130
147
  new(transformed_hash)
@@ -190,7 +207,7 @@ module Api
190
207
  def to_hash
191
208
  hash = {}
192
209
  self.class.attribute_map.each_pair do |attr, param|
193
- value = send(attr)
210
+ value = self.send(attr)
194
211
  if value.nil?
195
212
  is_nullable = self.class.openapi_nullable.include?(attr)
196
213
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -218,5 +235,7 @@ module Api
218
235
  value
219
236
  end
220
237
  end
238
+
221
239
  end
240
+
222
241
  end
@@ -1,24 +1,27 @@
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 OnSessionPaymentError
18
- attr_accessor :code, :message
18
+ attr_accessor :code
19
+
20
+ attr_accessor :message
19
21
 
20
22
  class EnumAttributeValidator
21
- attr_reader :datatype, :allowable_values
23
+ attr_reader :datatype
24
+ attr_reader :allowable_values
22
25
 
23
26
  def initialize(datatype, allowable_values)
24
27
  @allowable_values = allowable_values.map do |value|
@@ -41,8 +44,8 @@ module Api
41
44
  # Attribute mapping from ruby-style variable name to JSON key.
42
45
  def self.attribute_map
43
46
  {
44
- :code => :code,
45
- :message => :message
47
+ :'code' => :'code',
48
+ :'message' => :'message'
46
49
  }
47
50
  end
48
51
 
@@ -54,44 +57,49 @@ module Api
54
57
  # Attribute type mapping.
55
58
  def self.openapi_types
56
59
  {
57
- :code => :OnSessionPaymentErrorCode,
58
- :message => :String
60
+ :'code' => :'OnSessionPaymentErrorCode',
61
+ :'message' => :'String'
59
62
  }
60
63
  end
61
64
 
62
65
  # List of attributes with nullable: true
63
66
  def self.openapi_nullable
64
- Set.new([])
67
+ Set.new([
68
+ ])
65
69
  end
66
70
 
67
71
  # Initializes the object
68
72
  # @param [Hash] attributes Model attributes in the form of hash
69
73
  def initialize(attributes = {})
70
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Api::OnSessionPaymentError` initialize method' unless attributes.is_a?(Hash)
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::OnSessionPaymentError` initialize method"
76
+ end
71
77
 
72
78
  # check to see if the attribute exists and convert string to symbol for hash key
73
- attributes = attributes.each_with_object({}) do |(k, v), h|
74
- raise ArgumentError, "`#{k}` is not a valid attribute in `Api::OnSessionPaymentError`. 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)
75
-
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!self.class.attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::OnSessionPaymentError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
82
+ end
76
83
  h[k.to_sym] = v
77
- end
78
-
79
- self.code = if attributes.key?(:code)
80
- attributes[:code]
81
- else
82
- 'ON_SESSION_PAYMENT_ERROR_CODE_UNSPECIFIED'
83
- end
84
+ }
84
85
 
85
- return unless attributes.key?(:message)
86
+ if attributes.key?(:'code')
87
+ self.code = attributes[:'code']
88
+ else
89
+ self.code = 'ON_SESSION_PAYMENT_ERROR_CODE_UNSPECIFIED'
90
+ end
86
91
 
87
- self.message = attributes[:message]
92
+ if attributes.key?(:'message')
93
+ self.message = attributes[:'message']
94
+ end
88
95
  end
89
96
 
90
97
  # Show invalid properties with the reasons. Usually used together with valid?
91
98
  # @return Array for valid properties with the reasons
92
99
  def list_invalid_properties
93
100
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
94
- []
101
+ invalid_properties = Array.new
102
+ invalid_properties
95
103
  end
96
104
 
97
105
  # Check to see if the all the properties in the model are valid
@@ -103,18 +111,17 @@ module Api
103
111
 
104
112
  # Checks equality by comparing each attribute.
105
113
  # @param [Object] Object to be compared
106
- def ==(other)
107
- return true if equal?(other)
108
-
109
- self.class == other.class &&
110
- code == other.code &&
111
- message == other.message
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ code == o.code &&
118
+ message == o.message
112
119
  end
113
120
 
114
121
  # @see the `==` method
115
122
  # @param [Object] Object to be compared
116
- def eql?(other)
117
- self == other
123
+ def eql?(o)
124
+ self == o
118
125
  end
119
126
 
120
127
  # Calculates hash code according to all attributes.
@@ -128,18 +135,19 @@ module Api
128
135
  # @return [Object] Returns the model itself
129
136
  def self.build_from_hash(attributes)
130
137
  return nil unless attributes.is_a?(Hash)
131
-
132
138
  attributes = attributes.transform_keys(&:to_sym)
133
139
  transformed_hash = {}
134
140
  openapi_types.each_pair do |key, type|
135
141
  if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
136
- transformed_hash[key.to_s] = nil
142
+ transformed_hash["#{key}"] = nil
137
143
  elsif type =~ /\AArray<(.*)>/i
138
144
  # check to ensure the input is an array given that the attribute
139
145
  # is documented as an array but the input is not
140
- 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)
146
+ if attributes[attribute_map[key]].is_a?(Array)
147
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
148
+ end
141
149
  elsif !attributes[attribute_map[key]].nil?
142
- transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
150
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
151
  end
144
152
  end
145
153
  new(transformed_hash)
@@ -205,7 +213,7 @@ module Api
205
213
  def to_hash
206
214
  hash = {}
207
215
  self.class.attribute_map.each_pair do |attr, param|
208
- value = send(attr)
216
+ value = self.send(attr)
209
217
  if value.nil?
210
218
  is_nullable = self.class.openapi_nullable.include?(attr)
211
219
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -233,5 +241,7 @@ module Api
233
241
  value
234
242
  end
235
243
  end
244
+
236
245
  end
246
+
237
247
  end
@@ -1,30 +1,30 @@
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 OnSessionPaymentErrorCode
18
- UNSPECIFIED = 'ON_SESSION_PAYMENT_ERROR_CODE_UNSPECIFIED'
19
- MISSING_REDIRECT_URLS = 'ON_SESSION_PAYMENT_ERROR_CODE_MISSING_REDIRECT_URLS'
20
- MISSING_REQUIRED_PARAMETERS = 'ON_SESSION_PAYMENT_ERROR_CODE_MISSING_REQUIRED_PARAMETERS'
21
- MISSING_CHARGE = 'ON_SESSION_PAYMENT_ERROR_CODE_MISSING_CHARGE'
22
- CUSTOMER_NOT_FOUND = 'ON_SESSION_PAYMENT_ERROR_CODE_CUSTOMER_NOT_FOUND'
23
- CUSTOMER_INACTIVE = 'ON_SESSION_PAYMENT_ERROR_CODE_CUSTOMER_INACTIVE'
24
- MERCHANT_CUSTOMER_ALREADY_EXISTS = 'ON_SESSION_PAYMENT_ERROR_CODE_MERCHANT_CUSTOMER_ALREADY_EXISTS'
25
- VALIDATION_FAILED = 'ON_SESSION_PAYMENT_ERROR_CODE_VALIDATION_FAILED'
26
- STRATEGY_EXECUTION_FAILED = 'ON_SESSION_PAYMENT_ERROR_CODE_STRATEGY_EXECUTION_FAILED'
27
- INVALID_PAYMENT_STRATEGY = 'ON_SESSION_PAYMENT_ERROR_CODE_INVALID_PAYMENT_STRATEGY'
18
+ UNSPECIFIED = "ON_SESSION_PAYMENT_ERROR_CODE_UNSPECIFIED".freeze
19
+ MISSING_REDIRECT_URLS = "ON_SESSION_PAYMENT_ERROR_CODE_MISSING_REDIRECT_URLS".freeze
20
+ MISSING_REQUIRED_PARAMETERS = "ON_SESSION_PAYMENT_ERROR_CODE_MISSING_REQUIRED_PARAMETERS".freeze
21
+ MISSING_CHARGE = "ON_SESSION_PAYMENT_ERROR_CODE_MISSING_CHARGE".freeze
22
+ CUSTOMER_NOT_FOUND = "ON_SESSION_PAYMENT_ERROR_CODE_CUSTOMER_NOT_FOUND".freeze
23
+ CUSTOMER_INACTIVE = "ON_SESSION_PAYMENT_ERROR_CODE_CUSTOMER_INACTIVE".freeze
24
+ MERCHANT_CUSTOMER_ALREADY_EXISTS = "ON_SESSION_PAYMENT_ERROR_CODE_MERCHANT_CUSTOMER_ALREADY_EXISTS".freeze
25
+ VALIDATION_FAILED = "ON_SESSION_PAYMENT_ERROR_CODE_VALIDATION_FAILED".freeze
26
+ STRATEGY_EXECUTION_FAILED = "ON_SESSION_PAYMENT_ERROR_CODE_STRATEGY_EXECUTION_FAILED".freeze
27
+ INVALID_PAYMENT_STRATEGY = "ON_SESSION_PAYMENT_ERROR_CODE_INVALID_PAYMENT_STRATEGY".freeze
28
28
 
29
29
  def self.all_vars
30
30
  @all_vars ||= [UNSPECIFIED, MISSING_REDIRECT_URLS, MISSING_REQUIRED_PARAMETERS, MISSING_CHARGE, CUSTOMER_NOT_FOUND, CUSTOMER_INACTIVE, MERCHANT_CUSTOMER_ALREADY_EXISTS, VALIDATION_FAILED, STRATEGY_EXECUTION_FAILED, INVALID_PAYMENT_STRATEGY].freeze
@@ -42,7 +42,6 @@ module Api
42
42
  # @return [String] The enum value
43
43
  def build_from_hash(value)
44
44
  return value if OnSessionPaymentErrorCode.all_vars.include?(value)
45
-
46
45
  raise "Invalid ENUM value #{value} for class #OnSessionPaymentErrorCode"
47
46
  end
48
47
  end