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'
@@ -18,7 +18,8 @@ module Api
18
18
  attr_accessor :error_type
19
19
 
20
20
  class EnumAttributeValidator
21
- attr_reader :datatype, :allowable_values
21
+ attr_reader :datatype
22
+ attr_reader :allowable_values
22
23
 
23
24
  def initialize(datatype, allowable_values)
24
25
  @allowable_values = allowable_values.map do |value|
@@ -41,7 +42,7 @@ module Api
41
42
  # Attribute mapping from ruby-style variable name to JSON key.
42
43
  def self.attribute_map
43
44
  {
44
- :error_type => :errorType
45
+ :'error_type' => :'errorType'
45
46
  }
46
47
  end
47
48
 
@@ -53,39 +54,44 @@ module Api
53
54
  # Attribute type mapping.
54
55
  def self.openapi_types
55
56
  {
56
- :error_type => :ErrorType
57
+ :'error_type' => :'ErrorType'
57
58
  }
58
59
  end
59
60
 
60
61
  # List of attributes with nullable: true
61
62
  def self.openapi_nullable
62
- Set.new([])
63
+ Set.new([
64
+ ])
63
65
  end
64
66
 
65
67
  # Initializes the object
66
68
  # @param [Hash] attributes Model attributes in the form of hash
67
69
  def initialize(attributes = {})
68
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Api::ErrorResponse` initialize method' unless attributes.is_a?(Hash)
70
+ if (!attributes.is_a?(Hash))
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::ErrorResponse` initialize method"
72
+ end
69
73
 
70
74
  # check to see if the attribute exists and convert string to symbol for hash key
71
- attributes = attributes.each_with_object({}) do |(k, v), h|
72
- raise ArgumentError, "`#{k}` is not a valid attribute in `Api::ErrorResponse`. 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)
73
-
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!self.class.attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::ErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
78
+ end
74
79
  h[k.to_sym] = v
75
- end
80
+ }
76
81
 
77
- self.error_type = if attributes.key?(:error_type)
78
- attributes[:error_type]
79
- else
80
- 'ERROR_TYPE_UNSPECIFIED'
81
- end
82
+ if attributes.key?(:'error_type')
83
+ self.error_type = attributes[:'error_type']
84
+ else
85
+ self.error_type = 'ERROR_TYPE_UNSPECIFIED'
86
+ end
82
87
  end
83
88
 
84
89
  # Show invalid properties with the reasons. Usually used together with valid?
85
90
  # @return Array for valid properties with the reasons
86
91
  def list_invalid_properties
87
92
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
88
- []
93
+ invalid_properties = Array.new
94
+ invalid_properties
89
95
  end
90
96
 
91
97
  # Check to see if the all the properties in the model are valid
@@ -97,17 +103,16 @@ module Api
97
103
 
98
104
  # Checks equality by comparing each attribute.
99
105
  # @param [Object] Object to be compared
100
- def ==(other)
101
- return true if equal?(other)
102
-
103
- self.class == other.class &&
104
- error_type == other.error_type
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ error_type == o.error_type
105
110
  end
106
111
 
107
112
  # @see the `==` method
108
113
  # @param [Object] Object to be compared
109
- def eql?(other)
110
- self == other
114
+ def eql?(o)
115
+ self == o
111
116
  end
112
117
 
113
118
  # Calculates hash code according to all attributes.
@@ -121,18 +126,19 @@ module Api
121
126
  # @return [Object] Returns the model itself
122
127
  def self.build_from_hash(attributes)
123
128
  return nil unless attributes.is_a?(Hash)
124
-
125
129
  attributes = attributes.transform_keys(&:to_sym)
126
130
  transformed_hash = {}
127
131
  openapi_types.each_pair do |key, type|
128
132
  if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
129
- transformed_hash[key.to_s] = nil
133
+ transformed_hash["#{key}"] = nil
130
134
  elsif type =~ /\AArray<(.*)>/i
131
135
  # check to ensure the input is an array given that the attribute
132
136
  # is documented as an array but the input is not
133
- 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)
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
134
140
  elsif !attributes[attribute_map[key]].nil?
135
- transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
136
142
  end
137
143
  end
138
144
  new(transformed_hash)
@@ -198,7 +204,7 @@ module Api
198
204
  def to_hash
199
205
  hash = {}
200
206
  self.class.attribute_map.each_pair do |attr, param|
201
- value = send(attr)
207
+ value = self.send(attr)
202
208
  if value.nil?
203
209
  is_nullable = self.class.openapi_nullable.include?(attr)
204
210
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -226,5 +232,7 @@ module Api
226
232
  value
227
233
  end
228
234
  end
235
+
229
236
  end
237
+
230
238
  end
@@ -1,39 +1,39 @@
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 ErrorType
18
- UNSPECIFIED = 'ERROR_TYPE_UNSPECIFIED'
19
- AUTH_FAILED = 'ERROR_TYPE_AUTH_FAILED'
20
- AUTH_REJECTED = 'ERROR_TYPE_AUTH_REJECTED'
21
- ACCOUNT_CREATION_FAILED = 'ERROR_TYPE_ACCOUNT_CREATION_FAILED'
22
- ACCOUNT_MODIFICATION_FAILED = 'ERROR_TYPE_ACCOUNT_MODIFICATION_FAILED'
23
- ACCOUNT_DELETION_FAILED = 'ERROR_TYPE_ACCOUNT_DELETION_FAILED'
24
- ACCOUNT_BANK_REGISTRATION_FAILED = 'ERROR_TYPE_ACCOUNT_BANK_REGISTRATION_FAILED'
25
- KYC_REJECTED = 'ERROR_TYPE_KYC_REJECTED'
26
- NOTIFICATION_WEBHOOK_FAILED = 'ERROR_TYPE_NOTIFICATION_WEBHOOK_FAILED'
27
- NOTIFICATION_EMAIL_FAILED = 'ERROR_TYPE_NOTIFICATION_EMAIL_FAILED'
28
- NOTIFICATION_SMS_FAILED = 'ERROR_TYPE_NOTIFICATION_SMS_FAILED'
29
- PAYMENT_GATEWAY_UNAVAILABLE = 'ERROR_TYPE_PAYMENT_GATEWAY_UNAVAILABLE'
30
- PAYMENT_GATEWAY_FAILED = 'ERROR_TYPE_PAYMENT_GATEWAY_FAILED'
31
- PAYMENT_VALIDATION_FAILED = 'ERROR_TYPE_PAYMENT_VALIDATION_FAILED'
32
- PAYMENT_CHARGE_FAILED = 'ERROR_TYPE_PAYMENT_CHARGE_FAILED'
33
- PAYMENT_CHARGE_REJECTED = 'ERROR_TYPE_PAYMENT_CHARGE_REJECTED'
34
- PAYMENT_CHARGE_OVER_LIMIT = 'ERROR_TYPE_PAYMENT_CHARGE_OVER_LIMIT'
35
- PAYMENT_CHARGE_SUBSCRIPTION_EXPIRED = 'ERROR_TYPE_PAYMENT_CHARGE_SUBSCRIPTION_EXPIRED'
36
- PAYMENT_LINK_EXPIRED = 'ERROR_TYPE_PAYMENT_LINK_EXPIRED'
18
+ UNSPECIFIED = "ERROR_TYPE_UNSPECIFIED".freeze
19
+ AUTH_FAILED = "ERROR_TYPE_AUTH_FAILED".freeze
20
+ AUTH_REJECTED = "ERROR_TYPE_AUTH_REJECTED".freeze
21
+ ACCOUNT_CREATION_FAILED = "ERROR_TYPE_ACCOUNT_CREATION_FAILED".freeze
22
+ ACCOUNT_MODIFICATION_FAILED = "ERROR_TYPE_ACCOUNT_MODIFICATION_FAILED".freeze
23
+ ACCOUNT_DELETION_FAILED = "ERROR_TYPE_ACCOUNT_DELETION_FAILED".freeze
24
+ ACCOUNT_BANK_REGISTRATION_FAILED = "ERROR_TYPE_ACCOUNT_BANK_REGISTRATION_FAILED".freeze
25
+ KYC_REJECTED = "ERROR_TYPE_KYC_REJECTED".freeze
26
+ NOTIFICATION_WEBHOOK_FAILED = "ERROR_TYPE_NOTIFICATION_WEBHOOK_FAILED".freeze
27
+ NOTIFICATION_EMAIL_FAILED = "ERROR_TYPE_NOTIFICATION_EMAIL_FAILED".freeze
28
+ NOTIFICATION_SMS_FAILED = "ERROR_TYPE_NOTIFICATION_SMS_FAILED".freeze
29
+ PAYMENT_GATEWAY_UNAVAILABLE = "ERROR_TYPE_PAYMENT_GATEWAY_UNAVAILABLE".freeze
30
+ PAYMENT_GATEWAY_FAILED = "ERROR_TYPE_PAYMENT_GATEWAY_FAILED".freeze
31
+ PAYMENT_VALIDATION_FAILED = "ERROR_TYPE_PAYMENT_VALIDATION_FAILED".freeze
32
+ PAYMENT_CHARGE_FAILED = "ERROR_TYPE_PAYMENT_CHARGE_FAILED".freeze
33
+ PAYMENT_CHARGE_REJECTED = "ERROR_TYPE_PAYMENT_CHARGE_REJECTED".freeze
34
+ PAYMENT_CHARGE_OVER_LIMIT = "ERROR_TYPE_PAYMENT_CHARGE_OVER_LIMIT".freeze
35
+ PAYMENT_CHARGE_SUBSCRIPTION_EXPIRED = "ERROR_TYPE_PAYMENT_CHARGE_SUBSCRIPTION_EXPIRED".freeze
36
+ PAYMENT_LINK_EXPIRED = "ERROR_TYPE_PAYMENT_LINK_EXPIRED".freeze
37
37
 
38
38
  def self.all_vars
39
39
  @all_vars ||= [UNSPECIFIED, AUTH_FAILED, AUTH_REJECTED, ACCOUNT_CREATION_FAILED, ACCOUNT_MODIFICATION_FAILED, ACCOUNT_DELETION_FAILED, ACCOUNT_BANK_REGISTRATION_FAILED, KYC_REJECTED, NOTIFICATION_WEBHOOK_FAILED, NOTIFICATION_EMAIL_FAILED, NOTIFICATION_SMS_FAILED, PAYMENT_GATEWAY_UNAVAILABLE, PAYMENT_GATEWAY_FAILED, PAYMENT_VALIDATION_FAILED, PAYMENT_CHARGE_FAILED, PAYMENT_CHARGE_REJECTED, PAYMENT_CHARGE_OVER_LIMIT, PAYMENT_CHARGE_SUBSCRIPTION_EXPIRED, PAYMENT_LINK_EXPIRED].freeze
@@ -51,7 +51,6 @@ module Api
51
51
  # @return [String] The enum value
52
52
  def build_from_hash(value)
53
53
  return value if ErrorType.all_vars.include?(value)
54
-
55
54
  raise "Invalid ENUM value #{value} for class #ErrorType"
56
55
  end
57
56
  end
@@ -1,29 +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 EventType
18
- UNSPECIFIED = 'EVENT_TYPE_UNSPECIFIED'
19
- CHARGE_CREATED = 'EVENT_TYPE_CHARGE_CREATED'
20
- CHARGE_UPDATED = 'EVENT_TYPE_CHARGE_UPDATED'
21
- CHARGE_SUCCESS = 'EVENT_TYPE_CHARGE_SUCCESS'
22
- CHARGE_FAIL = 'EVENT_TYPE_CHARGE_FAIL'
23
- CHARGE_CANCEL = 'EVENT_TYPE_CHARGE_CANCEL'
24
- CONTRACT_ACTIVATED = 'EVENT_TYPE_CONTRACT_ACTIVATED'
25
- USER_ACCOUNT_DELETED = 'EVENT_TYPE_USER_ACCOUNT_DELETED'
26
- TESTING = 'EVENT_TYPE_TESTING'
18
+ UNSPECIFIED = "EVENT_TYPE_UNSPECIFIED".freeze
19
+ CHARGE_CREATED = "EVENT_TYPE_CHARGE_CREATED".freeze
20
+ CHARGE_UPDATED = "EVENT_TYPE_CHARGE_UPDATED".freeze
21
+ CHARGE_SUCCESS = "EVENT_TYPE_CHARGE_SUCCESS".freeze
22
+ CHARGE_FAIL = "EVENT_TYPE_CHARGE_FAIL".freeze
23
+ CHARGE_CANCEL = "EVENT_TYPE_CHARGE_CANCEL".freeze
24
+ CONTRACT_ACTIVATED = "EVENT_TYPE_CONTRACT_ACTIVATED".freeze
25
+ USER_ACCOUNT_DELETED = "EVENT_TYPE_USER_ACCOUNT_DELETED".freeze
26
+ TESTING = "EVENT_TYPE_TESTING".freeze
27
27
 
28
28
  def self.all_vars
29
29
  @all_vars ||= [UNSPECIFIED, CHARGE_CREATED, CHARGE_UPDATED, CHARGE_SUCCESS, CHARGE_FAIL, CHARGE_CANCEL, CONTRACT_ACTIVATED, USER_ACCOUNT_DELETED, TESTING].freeze
@@ -41,7 +41,6 @@ module Api
41
41
  # @return [String] The enum value
42
42
  def build_from_hash(value)
43
43
  return value if EventType.all_vars.include?(value)
44
-
45
44
  raise "Invalid ENUM value #{value} for class #EventType"
46
45
  end
47
46
  end
@@ -1,14 +1,14 @@
1
- # frozen_string_literal: true
2
-
3
- # #Jamm API
4
- #
5
- # No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
- #
7
- # The version of the OpenAPI document: 1.0
8
- #
9
- # Generated by: https://openapi-generator.tech
10
- # Generator version: 7.9.0
11
- #
1
+ =begin
2
+ #Jamm API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
12
 
13
13
  require 'date'
14
14
  require 'time'
@@ -20,7 +20,7 @@ module Api
20
20
  # Attribute mapping from ruby-style variable name to JSON key.
21
21
  def self.attribute_map
22
22
  {
23
- :bank => :bank
23
+ :'bank' => :'bank'
24
24
  }
25
25
  end
26
26
 
@@ -32,37 +32,42 @@ module Api
32
32
  # Attribute type mapping.
33
33
  def self.openapi_types
34
34
  {
35
- :bank => :Bank
35
+ :'bank' => :'Bank'
36
36
  }
37
37
  end
38
38
 
39
39
  # List of attributes with nullable: true
40
40
  def self.openapi_nullable
41
- Set.new([])
41
+ Set.new([
42
+ ])
42
43
  end
43
44
 
44
45
  # Initializes the object
45
46
  # @param [Hash] attributes Model attributes in the form of hash
46
47
  def initialize(attributes = {})
47
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Api::GetBankResponse` initialize method' unless attributes.is_a?(Hash)
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::GetBankResponse` initialize method"
50
+ end
48
51
 
49
52
  # check to see if the attribute exists and convert string to symbol for hash key
50
- attributes = attributes.each_with_object({}) do |(k, v), h|
51
- raise ArgumentError, "`#{k}` is not a valid attribute in `Api::GetBankResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect unless self.class.attribute_map.key?(k.to_sym)
52
-
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::GetBankResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
53
57
  h[k.to_sym] = v
54
- end
55
-
56
- return unless attributes.key?(:bank)
58
+ }
57
59
 
58
- self.bank = attributes[:bank]
60
+ if attributes.key?(:'bank')
61
+ self.bank = attributes[:'bank']
62
+ end
59
63
  end
60
64
 
61
65
  # Show invalid properties with the reasons. Usually used together with valid?
62
66
  # @return Array for valid properties with the reasons
63
67
  def list_invalid_properties
64
68
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
65
- []
69
+ invalid_properties = Array.new
70
+ invalid_properties
66
71
  end
67
72
 
68
73
  # Check to see if the all the properties in the model are valid
@@ -74,17 +79,16 @@ module Api
74
79
 
75
80
  # Checks equality by comparing each attribute.
76
81
  # @param [Object] Object to be compared
77
- def ==(other)
78
- return true if equal?(other)
79
-
80
- self.class == other.class &&
81
- bank == other.bank
82
+ def ==(o)
83
+ return true if self.equal?(o)
84
+ self.class == o.class &&
85
+ bank == o.bank
82
86
  end
83
87
 
84
88
  # @see the `==` method
85
89
  # @param [Object] Object to be compared
86
- def eql?(other)
87
- self == other
90
+ def eql?(o)
91
+ self == o
88
92
  end
89
93
 
90
94
  # Calculates hash code according to all attributes.
@@ -98,18 +102,19 @@ module Api
98
102
  # @return [Object] Returns the model itself
99
103
  def self.build_from_hash(attributes)
100
104
  return nil unless attributes.is_a?(Hash)
101
-
102
105
  attributes = attributes.transform_keys(&:to_sym)
103
106
  transformed_hash = {}
104
107
  openapi_types.each_pair do |key, type|
105
108
  if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
106
- transformed_hash[key.to_s] = nil
109
+ transformed_hash["#{key}"] = nil
107
110
  elsif type =~ /\AArray<(.*)>/i
108
111
  # check to ensure the input is an array given that the attribute
109
112
  # is documented as an array but the input is not
110
- transformed_hash[key.to_s] = attributes[attribute_map[key]].map { |v| _deserialize(::Regexp.last_match(1), v) } if attributes[attribute_map[key]].is_a?(Array)
113
+ if attributes[attribute_map[key]].is_a?(Array)
114
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
115
+ end
111
116
  elsif !attributes[attribute_map[key]].nil?
112
- transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
117
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
113
118
  end
114
119
  end
115
120
  new(transformed_hash)
@@ -175,7 +180,7 @@ module Api
175
180
  def to_hash
176
181
  hash = {}
177
182
  self.class.attribute_map.each_pair do |attr, param|
178
- value = send(attr)
183
+ value = self.send(attr)
179
184
  if value.nil?
180
185
  is_nullable = self.class.openapi_nullable.include?(attr)
181
186
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -203,5 +208,7 @@ module Api
203
208
  value
204
209
  end
205
210
  end
211
+
206
212
  end
213
+
207
214
  end
@@ -1,14 +1,14 @@
1
- # frozen_string_literal: true
2
-
3
- # #Jamm API
4
- #
5
- # No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
- #
7
- # The version of the OpenAPI document: 1.0
8
- #
9
- # Generated by: https://openapi-generator.tech
10
- # Generator version: 7.9.0
11
- #
1
+ =begin
2
+ #Jamm API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
12
 
13
13
  require 'date'
14
14
  require 'time'
@@ -20,7 +20,7 @@ module Api
20
20
  # Attribute mapping from ruby-style variable name to JSON key.
21
21
  def self.attribute_map
22
22
  {
23
- :branch => :branch
23
+ :'branch' => :'branch'
24
24
  }
25
25
  end
26
26
 
@@ -32,37 +32,42 @@ module Api
32
32
  # Attribute type mapping.
33
33
  def self.openapi_types
34
34
  {
35
- :branch => :BankBranch
35
+ :'branch' => :'BankBranch'
36
36
  }
37
37
  end
38
38
 
39
39
  # List of attributes with nullable: true
40
40
  def self.openapi_nullable
41
- Set.new([])
41
+ Set.new([
42
+ ])
42
43
  end
43
44
 
44
45
  # Initializes the object
45
46
  # @param [Hash] attributes Model attributes in the form of hash
46
47
  def initialize(attributes = {})
47
- raise ArgumentError, 'The input argument (attributes) must be a hash in `Api::GetBranchResponse` initialize method' unless attributes.is_a?(Hash)
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::GetBranchResponse` initialize method"
50
+ end
48
51
 
49
52
  # check to see if the attribute exists and convert string to symbol for hash key
50
- attributes = attributes.each_with_object({}) do |(k, v), h|
51
- raise ArgumentError, "`#{k}` is not a valid attribute in `Api::GetBranchResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect unless self.class.attribute_map.key?(k.to_sym)
52
-
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::GetBranchResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
53
57
  h[k.to_sym] = v
54
- end
55
-
56
- return unless attributes.key?(:branch)
58
+ }
57
59
 
58
- self.branch = attributes[:branch]
60
+ if attributes.key?(:'branch')
61
+ self.branch = attributes[:'branch']
62
+ end
59
63
  end
60
64
 
61
65
  # Show invalid properties with the reasons. Usually used together with valid?
62
66
  # @return Array for valid properties with the reasons
63
67
  def list_invalid_properties
64
68
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
65
- []
69
+ invalid_properties = Array.new
70
+ invalid_properties
66
71
  end
67
72
 
68
73
  # Check to see if the all the properties in the model are valid
@@ -74,17 +79,16 @@ module Api
74
79
 
75
80
  # Checks equality by comparing each attribute.
76
81
  # @param [Object] Object to be compared
77
- def ==(other)
78
- return true if equal?(other)
79
-
80
- self.class == other.class &&
81
- branch == other.branch
82
+ def ==(o)
83
+ return true if self.equal?(o)
84
+ self.class == o.class &&
85
+ branch == o.branch
82
86
  end
83
87
 
84
88
  # @see the `==` method
85
89
  # @param [Object] Object to be compared
86
- def eql?(other)
87
- self == other
90
+ def eql?(o)
91
+ self == o
88
92
  end
89
93
 
90
94
  # Calculates hash code according to all attributes.
@@ -98,18 +102,19 @@ module Api
98
102
  # @return [Object] Returns the model itself
99
103
  def self.build_from_hash(attributes)
100
104
  return nil unless attributes.is_a?(Hash)
101
-
102
105
  attributes = attributes.transform_keys(&:to_sym)
103
106
  transformed_hash = {}
104
107
  openapi_types.each_pair do |key, type|
105
108
  if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
106
- transformed_hash[key.to_s] = nil
109
+ transformed_hash["#{key}"] = nil
107
110
  elsif type =~ /\AArray<(.*)>/i
108
111
  # check to ensure the input is an array given that the attribute
109
112
  # is documented as an array but the input is not
110
- transformed_hash[key.to_s] = attributes[attribute_map[key]].map { |v| _deserialize(::Regexp.last_match(1), v) } if attributes[attribute_map[key]].is_a?(Array)
113
+ if attributes[attribute_map[key]].is_a?(Array)
114
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
115
+ end
111
116
  elsif !attributes[attribute_map[key]].nil?
112
- transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
117
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
113
118
  end
114
119
  end
115
120
  new(transformed_hash)
@@ -175,7 +180,7 @@ module Api
175
180
  def to_hash
176
181
  hash = {}
177
182
  self.class.attribute_map.each_pair do |attr, param|
178
- value = send(attr)
183
+ value = self.send(attr)
179
184
  if value.nil?
180
185
  is_nullable = self.class.openapi_nullable.include?(attr)
181
186
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -203,5 +208,7 @@ module Api
203
208
  value
204
209
  end
205
210
  end
211
+
206
212
  end
213
+
207
214
  end