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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/jamm.gemspec +1 -1
- data/lib/jamm/api/api/customer_api.rb +82 -52
- data/lib/jamm/api/api/healthcheck_api.rb +18 -15
- data/lib/jamm/api/api/payment_api.rb +113 -62
- data/lib/jamm/api/api/webhook_service_api.rb +41 -28
- data/lib/jamm/api/api_client.rb +74 -66
- data/lib/jamm/api/api_error.rb +16 -16
- data/lib/jamm/api/configuration.rb +42 -34
- data/lib/jamm/api/models/apiv1_error.rb +56 -44
- data/lib/jamm/api/models/apiv1_status.rb +57 -47
- data/lib/jamm/api/models/customer_service_update_customer_body.rb +107 -69
- data/lib/jamm/api/models/googlerpc_status.rb +61 -45
- data/lib/jamm/api/models/protobuf_any.rb +42 -35
- data/lib/jamm/api/models/v1_add_charge_request.rb +59 -44
- data/lib/jamm/api/models/v1_add_charge_response.rb +59 -44
- data/lib/jamm/api/models/v1_bank.rb +150 -95
- data/lib/jamm/api/models/v1_bank_assets.rb +60 -47
- data/lib/jamm/api/models/v1_bank_branch.rb +83 -56
- data/lib/jamm/api/models/v1_bank_information.rb +71 -51
- data/lib/jamm/api/models/v1_bank_quota.rb +99 -64
- data/lib/jamm/api/models/v1_bank_scheduled_maintenance_period.rb +75 -52
- data/lib/jamm/api/models/v1_buyer.rb +104 -76
- data/lib/jamm/api/models/v1_charge.rb +67 -52
- data/lib/jamm/api/models/v1_charge_message.rb +151 -93
- data/lib/jamm/api/models/v1_charge_message_status.rb +17 -18
- data/lib/jamm/api/models/v1_charge_result.rb +152 -93
- data/lib/jamm/api/models/v1_contract.rb +64 -52
- data/lib/jamm/api/models/v1_contract_message.rb +67 -48
- data/lib/jamm/api/models/v1_contract_status.rb +20 -21
- data/lib/jamm/api/models/v1_create_contract_with_charge_request.rb +59 -44
- data/lib/jamm/api/models/v1_create_contract_with_charge_response.rb +67 -48
- data/lib/jamm/api/models/v1_create_contract_without_charge_request.rb +51 -40
- data/lib/jamm/api/models/v1_create_contract_without_charge_response.rb +59 -44
- data/lib/jamm/api/models/v1_create_customer_request.rb +42 -35
- data/lib/jamm/api/models/v1_create_customer_response.rb +42 -35
- data/lib/jamm/api/models/v1_customer.rb +91 -60
- data/lib/jamm/api/models/v1_delete_customer_response.rb +42 -35
- data/lib/jamm/api/models/v1_deposit_type.rb +14 -15
- data/lib/jamm/api/models/v1_error_detail.rb +57 -44
- data/lib/jamm/api/models/v1_error_response.rb +46 -38
- data/lib/jamm/api/models/v1_error_type.rb +30 -31
- data/lib/jamm/api/models/v1_event_type.rb +20 -21
- data/lib/jamm/api/models/v1_get_bank_response.rb +42 -35
- data/lib/jamm/api/models/v1_get_branch_response.rb +42 -35
- data/lib/jamm/api/models/v1_get_branches_response.rb +44 -36
- data/lib/jamm/api/models/v1_get_charge_response.rb +51 -40
- data/lib/jamm/api/models/v1_get_charges_response.rb +60 -45
- data/lib/jamm/api/models/v1_get_contract_response.rb +51 -40
- data/lib/jamm/api/models/v1_get_customer_response.rb +42 -35
- data/lib/jamm/api/models/v1_get_major_banks_response.rb +59 -44
- data/lib/jamm/api/models/v1_initial_charge.rb +61 -48
- data/lib/jamm/api/models/v1_kyc_status.rb +16 -17
- data/lib/jamm/api/models/v1_merchant.rb +51 -40
- data/lib/jamm/api/models/v1_merchant_customer.rb +51 -40
- data/lib/jamm/api/models/v1_merchant_webhook_message.rb +75 -57
- data/lib/jamm/api/models/v1_message_response.rb +67 -48
- data/lib/jamm/api/models/v1_off_session_payment_request.rb +51 -40
- data/lib/jamm/api/models/v1_off_session_payment_response.rb +51 -40
- data/lib/jamm/api/models/v1_on_session_payment_data.rb +67 -48
- data/lib/jamm/api/models/v1_on_session_payment_error.rb +55 -45
- data/lib/jamm/api/models/v1_on_session_payment_error_code.rb +21 -22
- data/lib/jamm/api/models/v1_on_session_payment_request.rb +67 -48
- data/lib/jamm/api/models/v1_on_session_payment_response.rb +59 -44
- data/lib/jamm/api/models/v1_pagination.rb +51 -40
- data/lib/jamm/api/models/v1_payment_authorization_status.rb +14 -15
- data/lib/jamm/api/models/v1_payment_link.rb +57 -44
- data/lib/jamm/api/models/v1_ping_response.rb +42 -35
- data/lib/jamm/api/models/v1_search_banks_response.rb +44 -36
- data/lib/jamm/api/models/v1_search_branches_response.rb +44 -36
- data/lib/jamm/api/models/v1_update_customer_response.rb +42 -35
- data/lib/jamm/api/models/v1_url.rb +48 -39
- data/lib/jamm/api/models/v1_user_account_message.rb +67 -48
- data/lib/jamm/api/models/v1_withdraw_request.rb +51 -40
- data/lib/jamm/api/models/v1_withdraw_response.rb +51 -40
- data/lib/jamm/api/version.rb +11 -11
- data/lib/jamm/api.rb +10 -10
- data/lib/jamm/charge.rb +12 -0
- data/lib/jamm/deprecation.rb +13 -0
- data/lib/jamm/payment.rb +61 -0
- data/lib/jamm/version.rb +1 -1
- data/lib/jamm.rb +2 -0
- metadata +5 -3
@@ -1,14 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
=begin
|
2
|
+
#Jamm API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.9.0
|
10
|
+
|
11
|
+
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
@@ -16,7 +16,9 @@ require 'time'
|
|
16
16
|
module Api
|
17
17
|
# PaymentLink contains a URL for merchant to navigate customer to Jamm payment page to complete the payment.
|
18
18
|
class PaymentLink
|
19
|
-
attr_accessor :url
|
19
|
+
attr_accessor :url
|
20
|
+
|
21
|
+
attr_accessor :created_at
|
20
22
|
|
21
23
|
# Expiration time of the payment url.
|
22
24
|
attr_accessor :expires_at
|
@@ -24,9 +26,9 @@ module Api
|
|
24
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
27
|
def self.attribute_map
|
26
28
|
{
|
27
|
-
:url => :url,
|
28
|
-
:created_at => :createdAt,
|
29
|
-
:expires_at => :expiresAt
|
29
|
+
:'url' => :'url',
|
30
|
+
:'created_at' => :'createdAt',
|
31
|
+
:'expires_at' => :'expiresAt'
|
30
32
|
}
|
31
33
|
end
|
32
34
|
|
@@ -38,43 +40,52 @@ module Api
|
|
38
40
|
# Attribute type mapping.
|
39
41
|
def self.openapi_types
|
40
42
|
{
|
41
|
-
:url => :String,
|
42
|
-
:created_at => :Time,
|
43
|
-
:expires_at => :Time
|
43
|
+
:'url' => :'String',
|
44
|
+
:'created_at' => :'Time',
|
45
|
+
:'expires_at' => :'Time'
|
44
46
|
}
|
45
47
|
end
|
46
48
|
|
47
49
|
# List of attributes with nullable: true
|
48
50
|
def self.openapi_nullable
|
49
|
-
Set.new([
|
51
|
+
Set.new([
|
52
|
+
])
|
50
53
|
end
|
51
54
|
|
52
55
|
# Initializes the object
|
53
56
|
# @param [Hash] attributes Model attributes in the form of hash
|
54
57
|
def initialize(attributes = {})
|
55
|
-
|
58
|
+
if (!attributes.is_a?(Hash))
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::PaymentLink` initialize method"
|
60
|
+
end
|
56
61
|
|
57
62
|
# check to see if the attribute exists and convert string to symbol for hash key
|
58
|
-
attributes = attributes.each_with_object({})
|
59
|
-
|
60
|
-
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
64
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::PaymentLink`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
66
|
+
end
|
61
67
|
h[k.to_sym] = v
|
62
|
-
|
63
|
-
|
64
|
-
self.url = attributes[:url] if attributes.key?(:url)
|
68
|
+
}
|
65
69
|
|
66
|
-
|
70
|
+
if attributes.key?(:'url')
|
71
|
+
self.url = attributes[:'url']
|
72
|
+
end
|
67
73
|
|
68
|
-
|
74
|
+
if attributes.key?(:'created_at')
|
75
|
+
self.created_at = attributes[:'created_at']
|
76
|
+
end
|
69
77
|
|
70
|
-
|
78
|
+
if attributes.key?(:'expires_at')
|
79
|
+
self.expires_at = attributes[:'expires_at']
|
80
|
+
end
|
71
81
|
end
|
72
82
|
|
73
83
|
# Show invalid properties with the reasons. Usually used together with valid?
|
74
84
|
# @return Array for valid properties with the reasons
|
75
85
|
def list_invalid_properties
|
76
86
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
77
|
-
|
87
|
+
invalid_properties = Array.new
|
88
|
+
invalid_properties
|
78
89
|
end
|
79
90
|
|
80
91
|
# Check to see if the all the properties in the model are valid
|
@@ -86,19 +97,18 @@ module Api
|
|
86
97
|
|
87
98
|
# Checks equality by comparing each attribute.
|
88
99
|
# @param [Object] Object to be compared
|
89
|
-
def ==(
|
90
|
-
return true if equal?(
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
expires_at == other.expires_at
|
100
|
+
def ==(o)
|
101
|
+
return true if self.equal?(o)
|
102
|
+
self.class == o.class &&
|
103
|
+
url == o.url &&
|
104
|
+
created_at == o.created_at &&
|
105
|
+
expires_at == o.expires_at
|
96
106
|
end
|
97
107
|
|
98
108
|
# @see the `==` method
|
99
109
|
# @param [Object] Object to be compared
|
100
|
-
def eql?(
|
101
|
-
self ==
|
110
|
+
def eql?(o)
|
111
|
+
self == o
|
102
112
|
end
|
103
113
|
|
104
114
|
# Calculates hash code according to all attributes.
|
@@ -112,18 +122,19 @@ module Api
|
|
112
122
|
# @return [Object] Returns the model itself
|
113
123
|
def self.build_from_hash(attributes)
|
114
124
|
return nil unless attributes.is_a?(Hash)
|
115
|
-
|
116
125
|
attributes = attributes.transform_keys(&:to_sym)
|
117
126
|
transformed_hash = {}
|
118
127
|
openapi_types.each_pair do |key, type|
|
119
128
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
120
|
-
transformed_hash[key
|
129
|
+
transformed_hash["#{key}"] = nil
|
121
130
|
elsif type =~ /\AArray<(.*)>/i
|
122
131
|
# check to ensure the input is an array given that the attribute
|
123
132
|
# is documented as an array but the input is not
|
124
|
-
|
133
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
134
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
135
|
+
end
|
125
136
|
elsif !attributes[attribute_map[key]].nil?
|
126
|
-
transformed_hash[key
|
137
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
127
138
|
end
|
128
139
|
end
|
129
140
|
new(transformed_hash)
|
@@ -189,7 +200,7 @@ module Api
|
|
189
200
|
def to_hash
|
190
201
|
hash = {}
|
191
202
|
self.class.attribute_map.each_pair do |attr, param|
|
192
|
-
value = send(attr)
|
203
|
+
value = self.send(attr)
|
193
204
|
if value.nil?
|
194
205
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
195
206
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -217,5 +228,7 @@ module Api
|
|
217
228
|
value
|
218
229
|
end
|
219
230
|
end
|
231
|
+
|
220
232
|
end
|
233
|
+
|
221
234
|
end
|
@@ -1,14 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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
|
-
:ok => :ok
|
23
|
+
:'ok' => :'ok'
|
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
|
-
:ok => :Boolean
|
35
|
+
:'ok' => :'Boolean'
|
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
|
-
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::PingResponse` 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({})
|
51
|
-
|
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::PingResponse`. 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
|
-
|
55
|
-
|
56
|
-
return unless attributes.key?(:ok)
|
58
|
+
}
|
57
59
|
|
58
|
-
|
60
|
+
if attributes.key?(:'ok')
|
61
|
+
self.ok = attributes[:'ok']
|
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 ==(
|
78
|
-
return true if equal?(
|
79
|
-
|
80
|
-
|
81
|
-
ok == other.ok
|
82
|
+
def ==(o)
|
83
|
+
return true if self.equal?(o)
|
84
|
+
self.class == o.class &&
|
85
|
+
ok == o.ok
|
82
86
|
end
|
83
87
|
|
84
88
|
# @see the `==` method
|
85
89
|
# @param [Object] Object to be compared
|
86
|
-
def eql?(
|
87
|
-
self ==
|
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
|
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
|
-
|
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
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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
|
-
:banks => :banks
|
23
|
+
:'banks' => :'banks'
|
24
24
|
}
|
25
25
|
end
|
26
26
|
|
@@ -32,38 +32,44 @@ module Api
|
|
32
32
|
# Attribute type mapping.
|
33
33
|
def self.openapi_types
|
34
34
|
{
|
35
|
-
:banks => :'Array<Bank>'
|
35
|
+
:'banks' => :'Array<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
|
-
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::SearchBanksResponse` 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({})
|
51
|
-
|
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::SearchBanksResponse`. 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
|
-
|
55
|
-
|
56
|
-
return unless attributes.key?(:banks)
|
57
|
-
return unless (value = attributes[:banks]).is_a?(Array)
|
58
|
+
}
|
58
59
|
|
59
|
-
|
60
|
+
if attributes.key?(:'banks')
|
61
|
+
if (value = attributes[:'banks']).is_a?(Array)
|
62
|
+
self.banks = value
|
63
|
+
end
|
64
|
+
end
|
60
65
|
end
|
61
66
|
|
62
67
|
# Show invalid properties with the reasons. Usually used together with valid?
|
63
68
|
# @return Array for valid properties with the reasons
|
64
69
|
def list_invalid_properties
|
65
70
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
66
|
-
|
71
|
+
invalid_properties = Array.new
|
72
|
+
invalid_properties
|
67
73
|
end
|
68
74
|
|
69
75
|
# Check to see if the all the properties in the model are valid
|
@@ -75,17 +81,16 @@ module Api
|
|
75
81
|
|
76
82
|
# Checks equality by comparing each attribute.
|
77
83
|
# @param [Object] Object to be compared
|
78
|
-
def ==(
|
79
|
-
return true if equal?(
|
80
|
-
|
81
|
-
|
82
|
-
banks == other.banks
|
84
|
+
def ==(o)
|
85
|
+
return true if self.equal?(o)
|
86
|
+
self.class == o.class &&
|
87
|
+
banks == o.banks
|
83
88
|
end
|
84
89
|
|
85
90
|
# @see the `==` method
|
86
91
|
# @param [Object] Object to be compared
|
87
|
-
def eql?(
|
88
|
-
self ==
|
92
|
+
def eql?(o)
|
93
|
+
self == o
|
89
94
|
end
|
90
95
|
|
91
96
|
# Calculates hash code according to all attributes.
|
@@ -99,18 +104,19 @@ module Api
|
|
99
104
|
# @return [Object] Returns the model itself
|
100
105
|
def self.build_from_hash(attributes)
|
101
106
|
return nil unless attributes.is_a?(Hash)
|
102
|
-
|
103
107
|
attributes = attributes.transform_keys(&:to_sym)
|
104
108
|
transformed_hash = {}
|
105
109
|
openapi_types.each_pair do |key, type|
|
106
110
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
107
|
-
transformed_hash[key
|
111
|
+
transformed_hash["#{key}"] = nil
|
108
112
|
elsif type =~ /\AArray<(.*)>/i
|
109
113
|
# check to ensure the input is an array given that the attribute
|
110
114
|
# is documented as an array but the input is not
|
111
|
-
|
115
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
116
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
117
|
+
end
|
112
118
|
elsif !attributes[attribute_map[key]].nil?
|
113
|
-
transformed_hash[key
|
119
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
114
120
|
end
|
115
121
|
end
|
116
122
|
new(transformed_hash)
|
@@ -176,7 +182,7 @@ module Api
|
|
176
182
|
def to_hash
|
177
183
|
hash = {}
|
178
184
|
self.class.attribute_map.each_pair do |attr, param|
|
179
|
-
value = send(attr)
|
185
|
+
value = self.send(attr)
|
180
186
|
if value.nil?
|
181
187
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
182
188
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -204,5 +210,7 @@ module Api
|
|
204
210
|
value
|
205
211
|
end
|
206
212
|
end
|
213
|
+
|
207
214
|
end
|
215
|
+
|
208
216
|
end
|
@@ -1,14 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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
|
-
:branches => :branches
|
23
|
+
:'branches' => :'branches'
|
24
24
|
}
|
25
25
|
end
|
26
26
|
|
@@ -32,38 +32,44 @@ module Api
|
|
32
32
|
# Attribute type mapping.
|
33
33
|
def self.openapi_types
|
34
34
|
{
|
35
|
-
:branches => :'Array<BankBranch>'
|
35
|
+
:'branches' => :'Array<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
|
-
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::SearchBranchesResponse` 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({})
|
51
|
-
|
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::SearchBranchesResponse`. 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
|
-
|
55
|
-
|
56
|
-
return unless attributes.key?(:branches)
|
57
|
-
return unless (value = attributes[:branches]).is_a?(Array)
|
58
|
+
}
|
58
59
|
|
59
|
-
|
60
|
+
if attributes.key?(:'branches')
|
61
|
+
if (value = attributes[:'branches']).is_a?(Array)
|
62
|
+
self.branches = value
|
63
|
+
end
|
64
|
+
end
|
60
65
|
end
|
61
66
|
|
62
67
|
# Show invalid properties with the reasons. Usually used together with valid?
|
63
68
|
# @return Array for valid properties with the reasons
|
64
69
|
def list_invalid_properties
|
65
70
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
66
|
-
|
71
|
+
invalid_properties = Array.new
|
72
|
+
invalid_properties
|
67
73
|
end
|
68
74
|
|
69
75
|
# Check to see if the all the properties in the model are valid
|
@@ -75,17 +81,16 @@ module Api
|
|
75
81
|
|
76
82
|
# Checks equality by comparing each attribute.
|
77
83
|
# @param [Object] Object to be compared
|
78
|
-
def ==(
|
79
|
-
return true if equal?(
|
80
|
-
|
81
|
-
|
82
|
-
branches == other.branches
|
84
|
+
def ==(o)
|
85
|
+
return true if self.equal?(o)
|
86
|
+
self.class == o.class &&
|
87
|
+
branches == o.branches
|
83
88
|
end
|
84
89
|
|
85
90
|
# @see the `==` method
|
86
91
|
# @param [Object] Object to be compared
|
87
|
-
def eql?(
|
88
|
-
self ==
|
92
|
+
def eql?(o)
|
93
|
+
self == o
|
89
94
|
end
|
90
95
|
|
91
96
|
# Calculates hash code according to all attributes.
|
@@ -99,18 +104,19 @@ module Api
|
|
99
104
|
# @return [Object] Returns the model itself
|
100
105
|
def self.build_from_hash(attributes)
|
101
106
|
return nil unless attributes.is_a?(Hash)
|
102
|
-
|
103
107
|
attributes = attributes.transform_keys(&:to_sym)
|
104
108
|
transformed_hash = {}
|
105
109
|
openapi_types.each_pair do |key, type|
|
106
110
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
107
|
-
transformed_hash[key
|
111
|
+
transformed_hash["#{key}"] = nil
|
108
112
|
elsif type =~ /\AArray<(.*)>/i
|
109
113
|
# check to ensure the input is an array given that the attribute
|
110
114
|
# is documented as an array but the input is not
|
111
|
-
|
115
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
116
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
117
|
+
end
|
112
118
|
elsif !attributes[attribute_map[key]].nil?
|
113
|
-
transformed_hash[key
|
119
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
114
120
|
end
|
115
121
|
end
|
116
122
|
new(transformed_hash)
|
@@ -176,7 +182,7 @@ module Api
|
|
176
182
|
def to_hash
|
177
183
|
hash = {}
|
178
184
|
self.class.attribute_map.each_pair do |attr, param|
|
179
|
-
value = send(attr)
|
185
|
+
value = self.send(attr)
|
180
186
|
if value.nil?
|
181
187
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
182
188
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -204,5 +210,7 @@ module Api
|
|
204
210
|
value
|
205
211
|
end
|
206
212
|
end
|
213
|
+
|
207
214
|
end
|
215
|
+
|
208
216
|
end
|