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,13 +16,15 @@ require 'time'
16
16
  module Api
17
17
  # This message represents a request to process a payment directly within the application. It contains the customer ID and charge details to be processed.
18
18
  class OffSessionPaymentRequest
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 => :String,
38
- :charge => :InitialCharge
39
+ :'customer' => :'String',
40
+ :'charge' => :'InitialCharge'
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::OffSessionPaymentRequest` 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::OffSessionPaymentRequest` 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::OffSessionPaymentRequest`. 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::OffSessionPaymentRequest`. 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,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