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.
- checksums.yaml +4 -4
- data/Gemfile.lock +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 +91 -19
- 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 +238 -0
- 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 +350 -0
- data/lib/jamm/api/models/v1_bank_assets.rb +244 -0
- data/lib/jamm/api/models/v1_bank_branch.rb +259 -0
- data/lib/jamm/api/models/v1_bank_information.rb +71 -51
- data/lib/jamm/api/models/v1_bank_quota.rb +278 -0
- data/lib/jamm/api/models/v1_bank_scheduled_maintenance_period.rb +250 -0
- 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 +233 -0
- data/lib/jamm/api/models/v1_error_response.rb +238 -0
- data/lib/jamm/api/models/v1_error_type.rb +57 -0
- data/lib/jamm/api/models/v1_event_type.rb +20 -21
- data/lib/jamm/api/models/{v1_error.rb → v1_get_bank_response.rb} +45 -48
- data/lib/jamm/api/models/v1_get_branch_response.rb +214 -0
- data/lib/jamm/api/models/v1_get_branches_response.rb +216 -0
- 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 +232 -0
- 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 +216 -0
- data/lib/jamm/api/models/v1_search_branches_response.rb +216 -0
- 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 +25 -11
- data/lib/jamm/charge.rb +12 -0
- data/lib/jamm/deprecation.rb +13 -0
- data/lib/jamm/errors.rb +27 -1
- data/lib/jamm/payment.rb +61 -0
- data/lib/jamm/version.rb +1 -1
- data/lib/jamm.rb +2 -0
- metadata +19 -3
@@ -0,0 +1,232 @@
|
|
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
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Api
|
17
|
+
class GetMajorBanksResponse
|
18
|
+
attr_accessor :mizuho
|
19
|
+
|
20
|
+
attr_accessor :mufg
|
21
|
+
|
22
|
+
attr_accessor :smbc
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'mizuho' => :'mizuho',
|
28
|
+
:'mufg' => :'mufg',
|
29
|
+
:'smbc' => :'smbc'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
attribute_map.values
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'mizuho' => :'Bank',
|
42
|
+
:'mufg' => :'Bank',
|
43
|
+
:'smbc' => :'Bank'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# List of attributes with nullable: true
|
48
|
+
def self.openapi_nullable
|
49
|
+
Set.new([
|
50
|
+
])
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
55
|
+
def initialize(attributes = {})
|
56
|
+
if (!attributes.is_a?(Hash))
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::GetMajorBanksResponse` initialize method"
|
58
|
+
end
|
59
|
+
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::GetMajorBanksResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
64
|
+
end
|
65
|
+
h[k.to_sym] = v
|
66
|
+
}
|
67
|
+
|
68
|
+
if attributes.key?(:'mizuho')
|
69
|
+
self.mizuho = attributes[:'mizuho']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'mufg')
|
73
|
+
self.mufg = attributes[:'mufg']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'smbc')
|
77
|
+
self.smbc = attributes[:'smbc']
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
82
|
+
# @return Array for valid properties with the reasons
|
83
|
+
def list_invalid_properties
|
84
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
85
|
+
invalid_properties = Array.new
|
86
|
+
invalid_properties
|
87
|
+
end
|
88
|
+
|
89
|
+
# Check to see if the all the properties in the model are valid
|
90
|
+
# @return true if the model is valid
|
91
|
+
def valid?
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
93
|
+
true
|
94
|
+
end
|
95
|
+
|
96
|
+
# Checks equality by comparing each attribute.
|
97
|
+
# @param [Object] Object to be compared
|
98
|
+
def ==(o)
|
99
|
+
return true if self.equal?(o)
|
100
|
+
self.class == o.class &&
|
101
|
+
mizuho == o.mizuho &&
|
102
|
+
mufg == o.mufg &&
|
103
|
+
smbc == o.smbc
|
104
|
+
end
|
105
|
+
|
106
|
+
# @see the `==` method
|
107
|
+
# @param [Object] Object to be compared
|
108
|
+
def eql?(o)
|
109
|
+
self == o
|
110
|
+
end
|
111
|
+
|
112
|
+
# Calculates hash code according to all attributes.
|
113
|
+
# @return [Integer] Hash code
|
114
|
+
def hash
|
115
|
+
[mizuho, mufg, smbc].hash
|
116
|
+
end
|
117
|
+
|
118
|
+
# Builds the object from hash
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
+
# @return [Object] Returns the model itself
|
121
|
+
def self.build_from_hash(attributes)
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
123
|
+
attributes = attributes.transform_keys(&:to_sym)
|
124
|
+
transformed_hash = {}
|
125
|
+
openapi_types.each_pair do |key, type|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
127
|
+
transformed_hash["#{key}"] = nil
|
128
|
+
elsif type =~ /\AArray<(.*)>/i
|
129
|
+
# check to ensure the input is an array given that the attribute
|
130
|
+
# is documented as an array but the input is not
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
133
|
+
end
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
136
|
+
end
|
137
|
+
end
|
138
|
+
new(transformed_hash)
|
139
|
+
end
|
140
|
+
|
141
|
+
# Deserializes the data based on type
|
142
|
+
# @param string type Data type
|
143
|
+
# @param string value Value to be deserialized
|
144
|
+
# @return [Object] Deserialized data
|
145
|
+
def self._deserialize(type, value)
|
146
|
+
case type.to_sym
|
147
|
+
when :Time
|
148
|
+
Time.parse(value)
|
149
|
+
when :Date
|
150
|
+
Date.parse(value)
|
151
|
+
when :String
|
152
|
+
value.to_s
|
153
|
+
when :Integer
|
154
|
+
value.to_i
|
155
|
+
when :Float
|
156
|
+
value.to_f
|
157
|
+
when :Boolean
|
158
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
159
|
+
true
|
160
|
+
else
|
161
|
+
false
|
162
|
+
end
|
163
|
+
when :Object
|
164
|
+
# generic object (usually a Hash), return directly
|
165
|
+
value
|
166
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
167
|
+
inner_type = Regexp.last_match[:inner_type]
|
168
|
+
value.map { |v| _deserialize(inner_type, v) }
|
169
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
170
|
+
k_type = Regexp.last_match[:k_type]
|
171
|
+
v_type = Regexp.last_match[:v_type]
|
172
|
+
{}.tap do |hash|
|
173
|
+
value.each do |k, v|
|
174
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
else # model
|
178
|
+
# models (e.g. Pet) or oneOf
|
179
|
+
klass = Api.const_get(type)
|
180
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
# Returns the string representation of the object
|
185
|
+
# @return [String] String presentation of the object
|
186
|
+
def to_s
|
187
|
+
to_hash.to_s
|
188
|
+
end
|
189
|
+
|
190
|
+
# to_body is an alias to to_hash (backward compatibility)
|
191
|
+
# @return [Hash] Returns the object in the form of hash
|
192
|
+
def to_body
|
193
|
+
to_hash
|
194
|
+
end
|
195
|
+
|
196
|
+
# Returns the object in the form of hash
|
197
|
+
# @return [Hash] Returns the object in the form of hash
|
198
|
+
def to_hash
|
199
|
+
hash = {}
|
200
|
+
self.class.attribute_map.each_pair do |attr, param|
|
201
|
+
value = self.send(attr)
|
202
|
+
if value.nil?
|
203
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
204
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
205
|
+
end
|
206
|
+
|
207
|
+
hash[param] = _to_hash(value)
|
208
|
+
end
|
209
|
+
hash
|
210
|
+
end
|
211
|
+
|
212
|
+
# Outputs non-array value in the form of hash
|
213
|
+
# For object, use to_hash. Otherwise, just return the value
|
214
|
+
# @param [Object] value Any valid value
|
215
|
+
# @return [Hash] Returns the value in the form of hash
|
216
|
+
def _to_hash(value)
|
217
|
+
if value.is_a?(Array)
|
218
|
+
value.compact.map { |v| _to_hash(v) }
|
219
|
+
elsif value.is_a?(Hash)
|
220
|
+
{}.tap do |hash|
|
221
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
222
|
+
end
|
223
|
+
elsif value.respond_to? :to_hash
|
224
|
+
value.to_hash
|
225
|
+
else
|
226
|
+
value
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
end
|
231
|
+
|
232
|
+
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'
|
@@ -31,10 +31,10 @@ module Api
|
|
31
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
32
32
|
def self.attribute_map
|
33
33
|
{
|
34
|
-
:price => :price,
|
35
|
-
:description => :description,
|
36
|
-
:metadata => :metadata,
|
37
|
-
:expires_at => :expiresAt
|
34
|
+
:'price' => :'price',
|
35
|
+
:'description' => :'description',
|
36
|
+
:'metadata' => :'metadata',
|
37
|
+
:'expires_at' => :'expiresAt'
|
38
38
|
}
|
39
39
|
end
|
40
40
|
|
@@ -46,48 +46,59 @@ module Api
|
|
46
46
|
# Attribute type mapping.
|
47
47
|
def self.openapi_types
|
48
48
|
{
|
49
|
-
:price => :Integer,
|
50
|
-
:description => :String,
|
51
|
-
:metadata => :'Hash<String, String>',
|
52
|
-
:expires_at => :Time
|
49
|
+
:'price' => :'Integer',
|
50
|
+
:'description' => :'String',
|
51
|
+
:'metadata' => :'Hash<String, String>',
|
52
|
+
:'expires_at' => :'Time'
|
53
53
|
}
|
54
54
|
end
|
55
55
|
|
56
56
|
# List of attributes with nullable: true
|
57
57
|
def self.openapi_nullable
|
58
|
-
Set.new([
|
58
|
+
Set.new([
|
59
|
+
])
|
59
60
|
end
|
60
61
|
|
61
62
|
# Initializes the object
|
62
63
|
# @param [Hash] attributes Model attributes in the form of hash
|
63
64
|
def initialize(attributes = {})
|
64
|
-
|
65
|
+
if (!attributes.is_a?(Hash))
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::InitialCharge` initialize method"
|
67
|
+
end
|
65
68
|
|
66
69
|
# check to see if the attribute exists and convert string to symbol for hash key
|
67
|
-
attributes = attributes.each_with_object({})
|
68
|
-
|
69
|
-
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
71
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::InitialCharge`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
73
|
+
end
|
70
74
|
h[k.to_sym] = v
|
71
|
-
|
72
|
-
|
73
|
-
self.price = attributes[:price] if attributes.key?(:price)
|
75
|
+
}
|
74
76
|
|
75
|
-
|
77
|
+
if attributes.key?(:'price')
|
78
|
+
self.price = attributes[:'price']
|
79
|
+
end
|
76
80
|
|
77
|
-
if attributes.key?(:
|
78
|
-
self.
|
81
|
+
if attributes.key?(:'description')
|
82
|
+
self.description = attributes[:'description']
|
79
83
|
end
|
80
84
|
|
81
|
-
|
85
|
+
if attributes.key?(:'metadata')
|
86
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
87
|
+
self.metadata = value
|
88
|
+
end
|
89
|
+
end
|
82
90
|
|
83
|
-
|
91
|
+
if attributes.key?(:'expires_at')
|
92
|
+
self.expires_at = attributes[:'expires_at']
|
93
|
+
end
|
84
94
|
end
|
85
95
|
|
86
96
|
# Show invalid properties with the reasons. Usually used together with valid?
|
87
97
|
# @return Array for valid properties with the reasons
|
88
98
|
def list_invalid_properties
|
89
99
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
90
|
-
|
100
|
+
invalid_properties = Array.new
|
101
|
+
invalid_properties
|
91
102
|
end
|
92
103
|
|
93
104
|
# Check to see if the all the properties in the model are valid
|
@@ -99,20 +110,19 @@ module Api
|
|
99
110
|
|
100
111
|
# Checks equality by comparing each attribute.
|
101
112
|
# @param [Object] Object to be compared
|
102
|
-
def ==(
|
103
|
-
return true if equal?(
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
expires_at == other.expires_at
|
113
|
+
def ==(o)
|
114
|
+
return true if self.equal?(o)
|
115
|
+
self.class == o.class &&
|
116
|
+
price == o.price &&
|
117
|
+
description == o.description &&
|
118
|
+
metadata == o.metadata &&
|
119
|
+
expires_at == o.expires_at
|
110
120
|
end
|
111
121
|
|
112
122
|
# @see the `==` method
|
113
123
|
# @param [Object] Object to be compared
|
114
|
-
def eql?(
|
115
|
-
self ==
|
124
|
+
def eql?(o)
|
125
|
+
self == o
|
116
126
|
end
|
117
127
|
|
118
128
|
# Calculates hash code according to all attributes.
|
@@ -126,18 +136,19 @@ module Api
|
|
126
136
|
# @return [Object] Returns the model itself
|
127
137
|
def self.build_from_hash(attributes)
|
128
138
|
return nil unless attributes.is_a?(Hash)
|
129
|
-
|
130
139
|
attributes = attributes.transform_keys(&:to_sym)
|
131
140
|
transformed_hash = {}
|
132
141
|
openapi_types.each_pair do |key, type|
|
133
142
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
134
|
-
transformed_hash[key
|
143
|
+
transformed_hash["#{key}"] = nil
|
135
144
|
elsif type =~ /\AArray<(.*)>/i
|
136
145
|
# check to ensure the input is an array given that the attribute
|
137
146
|
# is documented as an array but the input is not
|
138
|
-
|
147
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
148
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
149
|
+
end
|
139
150
|
elsif !attributes[attribute_map[key]].nil?
|
140
|
-
transformed_hash[key
|
151
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
141
152
|
end
|
142
153
|
end
|
143
154
|
new(transformed_hash)
|
@@ -203,7 +214,7 @@ module Api
|
|
203
214
|
def to_hash
|
204
215
|
hash = {}
|
205
216
|
self.class.attribute_map.each_pair do |attr, param|
|
206
|
-
value = send(attr)
|
217
|
+
value = self.send(attr)
|
207
218
|
if value.nil?
|
208
219
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
209
220
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -231,5 +242,7 @@ module Api
|
|
231
242
|
value
|
232
243
|
end
|
233
244
|
end
|
245
|
+
|
234
246
|
end
|
247
|
+
|
235
248
|
end
|
@@ -1,25 +1,25 @@
|
|
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'
|
15
15
|
|
16
16
|
module Api
|
17
17
|
class KycStatus
|
18
|
-
UNSPECIFIED =
|
19
|
-
APPROVED =
|
20
|
-
NOT_SUBMITTED =
|
21
|
-
IN_REVIEW =
|
22
|
-
DENIED =
|
18
|
+
UNSPECIFIED = "KYC_STATUS_UNSPECIFIED".freeze
|
19
|
+
APPROVED = "KYC_STATUS_APPROVED".freeze
|
20
|
+
NOT_SUBMITTED = "KYC_STATUS_NOT_SUBMITTED".freeze
|
21
|
+
IN_REVIEW = "KYC_STATUS_IN_REVIEW".freeze
|
22
|
+
DENIED = "KYC_STATUS_DENIED".freeze
|
23
23
|
|
24
24
|
def self.all_vars
|
25
25
|
@all_vars ||= [UNSPECIFIED, APPROVED, NOT_SUBMITTED, IN_REVIEW, DENIED].freeze
|
@@ -37,7 +37,6 @@ module Api
|
|
37
37
|
# @return [String] The enum value
|
38
38
|
def build_from_hash(value)
|
39
39
|
return value if KycStatus.all_vars.include?(value)
|
40
|
-
|
41
40
|
raise "Invalid ENUM value #{value} for class #KycStatus"
|
42
41
|
end
|
43
42
|
end
|
@@ -1,27 +1,29 @@
|
|
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'
|
15
15
|
|
16
16
|
module Api
|
17
17
|
class Merchant
|
18
|
-
attr_accessor :id
|
18
|
+
attr_accessor :id
|
19
|
+
|
20
|
+
attr_accessor :name
|
19
21
|
|
20
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
21
23
|
def self.attribute_map
|
22
24
|
{
|
23
|
-
:id => :id,
|
24
|
-
:name => :name
|
25
|
+
:'id' => :'id',
|
26
|
+
:'name' => :'name'
|
25
27
|
}
|
26
28
|
end
|
27
29
|
|
@@ -33,40 +35,47 @@ module Api
|
|
33
35
|
# Attribute type mapping.
|
34
36
|
def self.openapi_types
|
35
37
|
{
|
36
|
-
:id => :String,
|
37
|
-
:name => :String
|
38
|
+
:'id' => :'String',
|
39
|
+
:'name' => :'String'
|
38
40
|
}
|
39
41
|
end
|
40
42
|
|
41
43
|
# List of attributes with nullable: true
|
42
44
|
def self.openapi_nullable
|
43
|
-
Set.new([
|
45
|
+
Set.new([
|
46
|
+
])
|
44
47
|
end
|
45
48
|
|
46
49
|
# Initializes the object
|
47
50
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
51
|
def initialize(attributes = {})
|
49
|
-
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::Merchant` initialize method"
|
54
|
+
end
|
50
55
|
|
51
56
|
# check to see if the attribute exists and convert string to symbol for hash key
|
52
|
-
attributes = attributes.each_with_object({})
|
53
|
-
|
54
|
-
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::Merchant`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
55
61
|
h[k.to_sym] = v
|
56
|
-
|
57
|
-
|
58
|
-
self.id = attributes[:id] if attributes.key?(:id)
|
62
|
+
}
|
59
63
|
|
60
|
-
|
64
|
+
if attributes.key?(:'id')
|
65
|
+
self.id = attributes[:'id']
|
66
|
+
end
|
61
67
|
|
62
|
-
|
68
|
+
if attributes.key?(:'name')
|
69
|
+
self.name = attributes[:'name']
|
70
|
+
end
|
63
71
|
end
|
64
72
|
|
65
73
|
# Show invalid properties with the reasons. Usually used together with valid?
|
66
74
|
# @return Array for valid properties with the reasons
|
67
75
|
def list_invalid_properties
|
68
76
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
69
|
-
|
77
|
+
invalid_properties = Array.new
|
78
|
+
invalid_properties
|
70
79
|
end
|
71
80
|
|
72
81
|
# Check to see if the all the properties in the model are valid
|
@@ -78,18 +87,17 @@ module Api
|
|
78
87
|
|
79
88
|
# Checks equality by comparing each attribute.
|
80
89
|
# @param [Object] Object to be compared
|
81
|
-
def ==(
|
82
|
-
return true if equal?(
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
name == other.name
|
90
|
+
def ==(o)
|
91
|
+
return true if self.equal?(o)
|
92
|
+
self.class == o.class &&
|
93
|
+
id == o.id &&
|
94
|
+
name == o.name
|
87
95
|
end
|
88
96
|
|
89
97
|
# @see the `==` method
|
90
98
|
# @param [Object] Object to be compared
|
91
|
-
def eql?(
|
92
|
-
self ==
|
99
|
+
def eql?(o)
|
100
|
+
self == o
|
93
101
|
end
|
94
102
|
|
95
103
|
# Calculates hash code according to all attributes.
|
@@ -103,18 +111,19 @@ module Api
|
|
103
111
|
# @return [Object] Returns the model itself
|
104
112
|
def self.build_from_hash(attributes)
|
105
113
|
return nil unless attributes.is_a?(Hash)
|
106
|
-
|
107
114
|
attributes = attributes.transform_keys(&:to_sym)
|
108
115
|
transformed_hash = {}
|
109
116
|
openapi_types.each_pair do |key, type|
|
110
117
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
111
|
-
transformed_hash[key
|
118
|
+
transformed_hash["#{key}"] = nil
|
112
119
|
elsif type =~ /\AArray<(.*)>/i
|
113
120
|
# check to ensure the input is an array given that the attribute
|
114
121
|
# is documented as an array but the input is not
|
115
|
-
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
124
|
+
end
|
116
125
|
elsif !attributes[attribute_map[key]].nil?
|
117
|
-
transformed_hash[key
|
126
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
118
127
|
end
|
119
128
|
end
|
120
129
|
new(transformed_hash)
|
@@ -180,7 +189,7 @@ module Api
|
|
180
189
|
def to_hash
|
181
190
|
hash = {}
|
182
191
|
self.class.attribute_map.each_pair do |attr, param|
|
183
|
-
value = send(attr)
|
192
|
+
value = self.send(attr)
|
184
193
|
if value.nil?
|
185
194
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
186
195
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -208,5 +217,7 @@ module Api
|
|
208
217
|
value
|
209
218
|
end
|
210
219
|
end
|
220
|
+
|
211
221
|
end
|
222
|
+
|
212
223
|
end
|