jamm 1.6.0 → 2.0.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 +2 -4
- data/lib/jamm/api/api/payment_api.rb +272 -0
- data/lib/jamm/api/models/v1_async_status.rb +44 -0
- data/lib/jamm/api/models/v1_charge_result.rb +37 -4
- data/lib/jamm/api/models/v1_charge_status.rb +46 -0
- data/lib/jamm/api/models/v1_error_type.rb +16 -1
- data/lib/jamm/api/models/v1_event_type.rb +2 -2
- data/lib/jamm/api/models/v1_off_session_payment_async_request.rb +224 -0
- data/lib/jamm/api/models/v1_off_session_payment_async_response.rb +257 -0
- data/lib/jamm/api/models/v1_on_session_payment_data.rb +13 -4
- data/lib/jamm/api/models/v1_on_session_payment_error_code.rb +2 -1
- data/lib/jamm/api/models/v1_on_session_payment_request.rb +11 -1
- data/lib/jamm/api/models/v1_refund_request.rb +226 -0
- data/lib/jamm/api/models/v1_refund_response.rb +226 -0
- data/lib/jamm/api/models/{v1_get_major_banks_response.rb → v1_withdraw_async_request.rb} +17 -25
- data/lib/jamm/api/models/v1_withdraw_async_response.rb +257 -0
- data/lib/jamm/api/models/v1_withdraw_async_status_request.rb +215 -0
- data/lib/jamm/api/models/v1_withdraw_async_status_response.rb +257 -0
- data/lib/jamm/api.rb +10 -1
- data/lib/jamm/api_patches.rb +1 -1
- data/lib/jamm/client.rb +15 -1
- data/lib/jamm/customer.rb +17 -10
- data/lib/jamm/healthcheck.rb +3 -2
- data/lib/jamm/payment.rb +32 -10
- data/lib/jamm/version.rb +1 -1
- data/lib/jamm/webhook.rb +3 -2
- data/lib/jamm.rb +20 -7
- metadata +12 -5
- data/lib/jamm/charge.rb +0 -65
- data/lib/jamm/contract.rb +0 -39
|
@@ -0,0 +1,226 @@
|
|
|
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
|
+
# Request message for refunding a charge. The refund is always processed asynchronously. The final result is delivered via webhook (`charge_refund`).
|
|
18
|
+
class RefundRequest
|
|
19
|
+
# The charge ID to refund. 返金する決済のID。 @gotags: validate:\"required\"
|
|
20
|
+
attr_accessor :charge_id
|
|
21
|
+
|
|
22
|
+
# Optional refund amount in JPY. If omitted, the full refundable amount is used. 返金金額(日本円)。 省略した場合、全額返金となります。
|
|
23
|
+
attr_accessor :amount
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'charge_id' => :'chargeId',
|
|
29
|
+
:'amount' => :'amount'
|
|
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
|
+
:'charge_id' => :'String',
|
|
42
|
+
:'amount' => :'Integer'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# List of attributes with nullable: true
|
|
47
|
+
def self.openapi_nullable
|
|
48
|
+
Set.new([
|
|
49
|
+
])
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Initializes the object
|
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
54
|
+
def initialize(attributes = {})
|
|
55
|
+
if (!attributes.is_a?(Hash))
|
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::RefundRequest` initialize method"
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::RefundRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'charge_id')
|
|
68
|
+
self.charge_id = attributes[:'charge_id']
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'amount')
|
|
72
|
+
self.amount = attributes[:'amount']
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
77
|
+
# @return Array for valid properties with the reasons
|
|
78
|
+
def list_invalid_properties
|
|
79
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
80
|
+
invalid_properties = Array.new
|
|
81
|
+
invalid_properties
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Check to see if the all the properties in the model are valid
|
|
85
|
+
# @return true if the model is valid
|
|
86
|
+
def valid?
|
|
87
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
88
|
+
true
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Checks equality by comparing each attribute.
|
|
92
|
+
# @param [Object] Object to be compared
|
|
93
|
+
def ==(o)
|
|
94
|
+
return true if self.equal?(o)
|
|
95
|
+
self.class == o.class &&
|
|
96
|
+
charge_id == o.charge_id &&
|
|
97
|
+
amount == o.amount
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# @see the `==` method
|
|
101
|
+
# @param [Object] Object to be compared
|
|
102
|
+
def eql?(o)
|
|
103
|
+
self == o
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Calculates hash code according to all attributes.
|
|
107
|
+
# @return [Integer] Hash code
|
|
108
|
+
def hash
|
|
109
|
+
[charge_id, amount].hash
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Builds the object from hash
|
|
113
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
114
|
+
# @return [Object] Returns the model itself
|
|
115
|
+
def self.build_from_hash(attributes)
|
|
116
|
+
return nil unless attributes.is_a?(Hash)
|
|
117
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
118
|
+
transformed_hash = {}
|
|
119
|
+
openapi_types.each_pair do |key, type|
|
|
120
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
121
|
+
transformed_hash["#{key}"] = nil
|
|
122
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
123
|
+
# check to ensure the input is an array given that the attribute
|
|
124
|
+
# is documented as an array but the input is not
|
|
125
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
126
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
127
|
+
end
|
|
128
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
129
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
new(transformed_hash)
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Deserializes the data based on type
|
|
136
|
+
# @param string type Data type
|
|
137
|
+
# @param string value Value to be deserialized
|
|
138
|
+
# @return [Object] Deserialized data
|
|
139
|
+
def self._deserialize(type, value)
|
|
140
|
+
case type.to_sym
|
|
141
|
+
when :Time
|
|
142
|
+
Time.parse(value)
|
|
143
|
+
when :Date
|
|
144
|
+
Date.parse(value)
|
|
145
|
+
when :String
|
|
146
|
+
value.to_s
|
|
147
|
+
when :Integer
|
|
148
|
+
value.to_i
|
|
149
|
+
when :Float
|
|
150
|
+
value.to_f
|
|
151
|
+
when :Boolean
|
|
152
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
153
|
+
true
|
|
154
|
+
else
|
|
155
|
+
false
|
|
156
|
+
end
|
|
157
|
+
when :Object
|
|
158
|
+
# generic object (usually a Hash), return directly
|
|
159
|
+
value
|
|
160
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
161
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
162
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
163
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
164
|
+
k_type = Regexp.last_match[:k_type]
|
|
165
|
+
v_type = Regexp.last_match[:v_type]
|
|
166
|
+
{}.tap do |hash|
|
|
167
|
+
value.each do |k, v|
|
|
168
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
else # model
|
|
172
|
+
# models (e.g. Pet) or oneOf
|
|
173
|
+
klass = Api.const_get(type)
|
|
174
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Returns the string representation of the object
|
|
179
|
+
# @return [String] String presentation of the object
|
|
180
|
+
def to_s
|
|
181
|
+
to_hash.to_s
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
|
186
|
+
def to_body
|
|
187
|
+
to_hash
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Returns the object in the form of hash
|
|
191
|
+
# @return [Hash] Returns the object in the form of hash
|
|
192
|
+
def to_hash
|
|
193
|
+
hash = {}
|
|
194
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
195
|
+
value = self.send(attr)
|
|
196
|
+
if value.nil?
|
|
197
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
198
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
hash[param] = _to_hash(value)
|
|
202
|
+
end
|
|
203
|
+
hash
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Outputs non-array value in the form of hash
|
|
207
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
208
|
+
# @param [Object] value Any valid value
|
|
209
|
+
# @return [Hash] Returns the value in the form of hash
|
|
210
|
+
def _to_hash(value)
|
|
211
|
+
if value.is_a?(Array)
|
|
212
|
+
value.compact.map { |v| _to_hash(v) }
|
|
213
|
+
elsif value.is_a?(Hash)
|
|
214
|
+
{}.tap do |hash|
|
|
215
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
216
|
+
end
|
|
217
|
+
elsif value.respond_to? :to_hash
|
|
218
|
+
value.to_hash
|
|
219
|
+
else
|
|
220
|
+
value
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
end
|
|
@@ -0,0 +1,226 @@
|
|
|
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
|
+
# Response message for the Refund endpoint. A successful response means the refund request was accepted and is being processed. The final result is delivered via webhook.
|
|
18
|
+
class RefundResponse
|
|
19
|
+
# The charge ID that the refund was requested for.
|
|
20
|
+
attr_accessor :charge_id
|
|
21
|
+
|
|
22
|
+
# The external refund ID for tracking this refund request.
|
|
23
|
+
attr_accessor :refund_id
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'charge_id' => :'chargeId',
|
|
29
|
+
:'refund_id' => :'refundId'
|
|
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
|
+
:'charge_id' => :'String',
|
|
42
|
+
:'refund_id' => :'String'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# List of attributes with nullable: true
|
|
47
|
+
def self.openapi_nullable
|
|
48
|
+
Set.new([
|
|
49
|
+
])
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Initializes the object
|
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
54
|
+
def initialize(attributes = {})
|
|
55
|
+
if (!attributes.is_a?(Hash))
|
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::RefundResponse` initialize method"
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::RefundResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'charge_id')
|
|
68
|
+
self.charge_id = attributes[:'charge_id']
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'refund_id')
|
|
72
|
+
self.refund_id = attributes[:'refund_id']
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
77
|
+
# @return Array for valid properties with the reasons
|
|
78
|
+
def list_invalid_properties
|
|
79
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
80
|
+
invalid_properties = Array.new
|
|
81
|
+
invalid_properties
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Check to see if the all the properties in the model are valid
|
|
85
|
+
# @return true if the model is valid
|
|
86
|
+
def valid?
|
|
87
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
88
|
+
true
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Checks equality by comparing each attribute.
|
|
92
|
+
# @param [Object] Object to be compared
|
|
93
|
+
def ==(o)
|
|
94
|
+
return true if self.equal?(o)
|
|
95
|
+
self.class == o.class &&
|
|
96
|
+
charge_id == o.charge_id &&
|
|
97
|
+
refund_id == o.refund_id
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# @see the `==` method
|
|
101
|
+
# @param [Object] Object to be compared
|
|
102
|
+
def eql?(o)
|
|
103
|
+
self == o
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Calculates hash code according to all attributes.
|
|
107
|
+
# @return [Integer] Hash code
|
|
108
|
+
def hash
|
|
109
|
+
[charge_id, refund_id].hash
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Builds the object from hash
|
|
113
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
114
|
+
# @return [Object] Returns the model itself
|
|
115
|
+
def self.build_from_hash(attributes)
|
|
116
|
+
return nil unless attributes.is_a?(Hash)
|
|
117
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
118
|
+
transformed_hash = {}
|
|
119
|
+
openapi_types.each_pair do |key, type|
|
|
120
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
121
|
+
transformed_hash["#{key}"] = nil
|
|
122
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
123
|
+
# check to ensure the input is an array given that the attribute
|
|
124
|
+
# is documented as an array but the input is not
|
|
125
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
126
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
127
|
+
end
|
|
128
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
129
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
new(transformed_hash)
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Deserializes the data based on type
|
|
136
|
+
# @param string type Data type
|
|
137
|
+
# @param string value Value to be deserialized
|
|
138
|
+
# @return [Object] Deserialized data
|
|
139
|
+
def self._deserialize(type, value)
|
|
140
|
+
case type.to_sym
|
|
141
|
+
when :Time
|
|
142
|
+
Time.parse(value)
|
|
143
|
+
when :Date
|
|
144
|
+
Date.parse(value)
|
|
145
|
+
when :String
|
|
146
|
+
value.to_s
|
|
147
|
+
when :Integer
|
|
148
|
+
value.to_i
|
|
149
|
+
when :Float
|
|
150
|
+
value.to_f
|
|
151
|
+
when :Boolean
|
|
152
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
153
|
+
true
|
|
154
|
+
else
|
|
155
|
+
false
|
|
156
|
+
end
|
|
157
|
+
when :Object
|
|
158
|
+
# generic object (usually a Hash), return directly
|
|
159
|
+
value
|
|
160
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
161
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
162
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
163
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
164
|
+
k_type = Regexp.last_match[:k_type]
|
|
165
|
+
v_type = Regexp.last_match[:v_type]
|
|
166
|
+
{}.tap do |hash|
|
|
167
|
+
value.each do |k, v|
|
|
168
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
else # model
|
|
172
|
+
# models (e.g. Pet) or oneOf
|
|
173
|
+
klass = Api.const_get(type)
|
|
174
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Returns the string representation of the object
|
|
179
|
+
# @return [String] String presentation of the object
|
|
180
|
+
def to_s
|
|
181
|
+
to_hash.to_s
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
|
186
|
+
def to_body
|
|
187
|
+
to_hash
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Returns the object in the form of hash
|
|
191
|
+
# @return [Hash] Returns the object in the form of hash
|
|
192
|
+
def to_hash
|
|
193
|
+
hash = {}
|
|
194
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
195
|
+
value = self.send(attr)
|
|
196
|
+
if value.nil?
|
|
197
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
198
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
hash[param] = _to_hash(value)
|
|
202
|
+
end
|
|
203
|
+
hash
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Outputs non-array value in the form of hash
|
|
207
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
208
|
+
# @param [Object] value Any valid value
|
|
209
|
+
# @return [Hash] Returns the value in the form of hash
|
|
210
|
+
def _to_hash(value)
|
|
211
|
+
if value.is_a?(Array)
|
|
212
|
+
value.compact.map { |v| _to_hash(v) }
|
|
213
|
+
elsif value.is_a?(Hash)
|
|
214
|
+
{}.tap do |hash|
|
|
215
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
216
|
+
end
|
|
217
|
+
elsif value.respond_to? :to_hash
|
|
218
|
+
value.to_hash
|
|
219
|
+
else
|
|
220
|
+
value
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
end
|
|
@@ -14,19 +14,17 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Api
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
# This message represents a request to withdraw money from a customer asynchronously. It contains the customer ID and the amount to withdraw.
|
|
18
|
+
class WithdrawAsyncRequest
|
|
19
|
+
attr_accessor :customer
|
|
19
20
|
|
|
20
|
-
attr_accessor :
|
|
21
|
-
|
|
22
|
-
attr_accessor :smbc
|
|
21
|
+
attr_accessor :charge
|
|
23
22
|
|
|
24
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
24
|
def self.attribute_map
|
|
26
25
|
{
|
|
27
|
-
:'
|
|
28
|
-
:'
|
|
29
|
-
:'smbc' => :'smbc'
|
|
26
|
+
:'customer' => :'customer',
|
|
27
|
+
:'charge' => :'charge'
|
|
30
28
|
}
|
|
31
29
|
end
|
|
32
30
|
|
|
@@ -38,9 +36,8 @@ module Api
|
|
|
38
36
|
# Attribute type mapping.
|
|
39
37
|
def self.openapi_types
|
|
40
38
|
{
|
|
41
|
-
:'
|
|
42
|
-
:'
|
|
43
|
-
:'smbc' => :'Bank'
|
|
39
|
+
:'customer' => :'String',
|
|
40
|
+
:'charge' => :'InitialCharge'
|
|
44
41
|
}
|
|
45
42
|
end
|
|
46
43
|
|
|
@@ -54,27 +51,23 @@ module Api
|
|
|
54
51
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
52
|
def initialize(attributes = {})
|
|
56
53
|
if (!attributes.is_a?(Hash))
|
|
57
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::WithdrawAsyncRequest` initialize method"
|
|
58
55
|
end
|
|
59
56
|
|
|
60
57
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
58
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
59
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
63
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::
|
|
60
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::WithdrawAsyncRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
64
61
|
end
|
|
65
62
|
h[k.to_sym] = v
|
|
66
63
|
}
|
|
67
64
|
|
|
68
|
-
if attributes.key?(:'
|
|
69
|
-
self.
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
if attributes.key?(:'mufg')
|
|
73
|
-
self.mufg = attributes[:'mufg']
|
|
65
|
+
if attributes.key?(:'customer')
|
|
66
|
+
self.customer = attributes[:'customer']
|
|
74
67
|
end
|
|
75
68
|
|
|
76
|
-
if attributes.key?(:'
|
|
77
|
-
self.
|
|
69
|
+
if attributes.key?(:'charge')
|
|
70
|
+
self.charge = attributes[:'charge']
|
|
78
71
|
end
|
|
79
72
|
end
|
|
80
73
|
|
|
@@ -98,9 +91,8 @@ module Api
|
|
|
98
91
|
def ==(o)
|
|
99
92
|
return true if self.equal?(o)
|
|
100
93
|
self.class == o.class &&
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
smbc == o.smbc
|
|
94
|
+
customer == o.customer &&
|
|
95
|
+
charge == o.charge
|
|
104
96
|
end
|
|
105
97
|
|
|
106
98
|
# @see the `==` method
|
|
@@ -112,7 +104,7 @@ module Api
|
|
|
112
104
|
# Calculates hash code according to all attributes.
|
|
113
105
|
# @return [Integer] Hash code
|
|
114
106
|
def hash
|
|
115
|
-
[
|
|
107
|
+
[customer, charge].hash
|
|
116
108
|
end
|
|
117
109
|
|
|
118
110
|
# Builds the object from hash
|