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
@@ -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'
|
@@ -24,8 +24,8 @@ module Api
|
|
24
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
25
|
def self.attribute_map
|
26
26
|
{
|
27
|
-
:success_url => :successUrl,
|
28
|
-
:failure_url => :failureUrl
|
27
|
+
:'success_url' => :'successUrl',
|
28
|
+
:'failure_url' => :'failureUrl'
|
29
29
|
}
|
30
30
|
end
|
31
31
|
|
@@ -37,40 +37,47 @@ module Api
|
|
37
37
|
# Attribute type mapping.
|
38
38
|
def self.openapi_types
|
39
39
|
{
|
40
|
-
:success_url => :String,
|
41
|
-
:failure_url => :String
|
40
|
+
:'success_url' => :'String',
|
41
|
+
:'failure_url' => :'String'
|
42
42
|
}
|
43
43
|
end
|
44
44
|
|
45
45
|
# List of attributes with nullable: true
|
46
46
|
def self.openapi_nullable
|
47
|
-
Set.new([
|
47
|
+
Set.new([
|
48
|
+
])
|
48
49
|
end
|
49
50
|
|
50
51
|
# Initializes the object
|
51
52
|
# @param [Hash] attributes Model attributes in the form of hash
|
52
53
|
def initialize(attributes = {})
|
53
|
-
|
54
|
+
if (!attributes.is_a?(Hash))
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::URL` initialize method"
|
56
|
+
end
|
54
57
|
|
55
58
|
# check to see if the attribute exists and convert string to symbol for hash key
|
56
|
-
attributes = attributes.each_with_object({})
|
57
|
-
|
58
|
-
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::URL`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
62
|
+
end
|
59
63
|
h[k.to_sym] = v
|
60
|
-
|
61
|
-
|
62
|
-
self.success_url = attributes[:success_url] if attributes.key?(:success_url)
|
64
|
+
}
|
63
65
|
|
64
|
-
|
66
|
+
if attributes.key?(:'success_url')
|
67
|
+
self.success_url = attributes[:'success_url']
|
68
|
+
end
|
65
69
|
|
66
|
-
|
70
|
+
if attributes.key?(:'failure_url')
|
71
|
+
self.failure_url = attributes[:'failure_url']
|
72
|
+
end
|
67
73
|
end
|
68
74
|
|
69
75
|
# Show invalid properties with the reasons. Usually used together with valid?
|
70
76
|
# @return Array for valid properties with the reasons
|
71
77
|
def list_invalid_properties
|
72
78
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
73
|
-
|
79
|
+
invalid_properties = Array.new
|
80
|
+
invalid_properties
|
74
81
|
end
|
75
82
|
|
76
83
|
# Check to see if the all the properties in the model are valid
|
@@ -82,18 +89,17 @@ module Api
|
|
82
89
|
|
83
90
|
# Checks equality by comparing each attribute.
|
84
91
|
# @param [Object] Object to be compared
|
85
|
-
def ==(
|
86
|
-
return true if equal?(
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
failure_url == other.failure_url
|
92
|
+
def ==(o)
|
93
|
+
return true if self.equal?(o)
|
94
|
+
self.class == o.class &&
|
95
|
+
success_url == o.success_url &&
|
96
|
+
failure_url == o.failure_url
|
91
97
|
end
|
92
98
|
|
93
99
|
# @see the `==` method
|
94
100
|
# @param [Object] Object to be compared
|
95
|
-
def eql?(
|
96
|
-
self ==
|
101
|
+
def eql?(o)
|
102
|
+
self == o
|
97
103
|
end
|
98
104
|
|
99
105
|
# Calculates hash code according to all attributes.
|
@@ -107,18 +113,19 @@ module Api
|
|
107
113
|
# @return [Object] Returns the model itself
|
108
114
|
def self.build_from_hash(attributes)
|
109
115
|
return nil unless attributes.is_a?(Hash)
|
110
|
-
|
111
116
|
attributes = attributes.transform_keys(&:to_sym)
|
112
117
|
transformed_hash = {}
|
113
118
|
openapi_types.each_pair do |key, type|
|
114
119
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
115
|
-
transformed_hash[key
|
120
|
+
transformed_hash["#{key}"] = nil
|
116
121
|
elsif type =~ /\AArray<(.*)>/i
|
117
122
|
# check to ensure the input is an array given that the attribute
|
118
123
|
# is documented as an array but the input is not
|
119
|
-
|
124
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
125
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
126
|
+
end
|
120
127
|
elsif !attributes[attribute_map[key]].nil?
|
121
|
-
transformed_hash[key
|
128
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
122
129
|
end
|
123
130
|
end
|
124
131
|
new(transformed_hash)
|
@@ -184,7 +191,7 @@ module Api
|
|
184
191
|
def to_hash
|
185
192
|
hash = {}
|
186
193
|
self.class.attribute_map.each_pair do |attr, param|
|
187
|
-
value = send(attr)
|
194
|
+
value = self.send(attr)
|
188
195
|
if value.nil?
|
189
196
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
190
197
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -212,5 +219,7 @@ module Api
|
|
212
219
|
value
|
213
220
|
end
|
214
221
|
end
|
222
|
+
|
215
223
|
end
|
224
|
+
|
216
225
|
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'
|
@@ -16,15 +16,21 @@ require 'time'
|
|
16
16
|
module Api
|
17
17
|
# UserAccountMessage contains information about a user account operation.
|
18
18
|
class UserAccountMessage
|
19
|
-
attr_accessor :customer
|
19
|
+
attr_accessor :customer
|
20
|
+
|
21
|
+
attr_accessor :email
|
22
|
+
|
23
|
+
attr_accessor :deleted_at
|
24
|
+
|
25
|
+
attr_accessor :merchant_name
|
20
26
|
|
21
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
28
|
def self.attribute_map
|
23
29
|
{
|
24
|
-
:customer => :customer,
|
25
|
-
:email => :email,
|
26
|
-
:deleted_at => :deletedAt,
|
27
|
-
:merchant_name => :merchantName
|
30
|
+
:'customer' => :'customer',
|
31
|
+
:'email' => :'email',
|
32
|
+
:'deleted_at' => :'deletedAt',
|
33
|
+
:'merchant_name' => :'merchantName'
|
28
34
|
}
|
29
35
|
end
|
30
36
|
|
@@ -36,46 +42,57 @@ module Api
|
|
36
42
|
# Attribute type mapping.
|
37
43
|
def self.openapi_types
|
38
44
|
{
|
39
|
-
:customer => :String,
|
40
|
-
:email => :String,
|
41
|
-
:deleted_at => :String,
|
42
|
-
:merchant_name => :String
|
45
|
+
:'customer' => :'String',
|
46
|
+
:'email' => :'String',
|
47
|
+
:'deleted_at' => :'String',
|
48
|
+
:'merchant_name' => :'String'
|
43
49
|
}
|
44
50
|
end
|
45
51
|
|
46
52
|
# List of attributes with nullable: true
|
47
53
|
def self.openapi_nullable
|
48
|
-
Set.new([
|
54
|
+
Set.new([
|
55
|
+
])
|
49
56
|
end
|
50
57
|
|
51
58
|
# Initializes the object
|
52
59
|
# @param [Hash] attributes Model attributes in the form of hash
|
53
60
|
def initialize(attributes = {})
|
54
|
-
|
61
|
+
if (!attributes.is_a?(Hash))
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::UserAccountMessage` initialize method"
|
63
|
+
end
|
55
64
|
|
56
65
|
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
-
attributes = attributes.each_with_object({})
|
58
|
-
|
59
|
-
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
67
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::UserAccountMessage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
69
|
+
end
|
60
70
|
h[k.to_sym] = v
|
61
|
-
|
62
|
-
|
63
|
-
self.customer = attributes[:customer] if attributes.key?(:customer)
|
71
|
+
}
|
64
72
|
|
65
|
-
|
73
|
+
if attributes.key?(:'customer')
|
74
|
+
self.customer = attributes[:'customer']
|
75
|
+
end
|
66
76
|
|
67
|
-
|
77
|
+
if attributes.key?(:'email')
|
78
|
+
self.email = attributes[:'email']
|
79
|
+
end
|
68
80
|
|
69
|
-
|
81
|
+
if attributes.key?(:'deleted_at')
|
82
|
+
self.deleted_at = attributes[:'deleted_at']
|
83
|
+
end
|
70
84
|
|
71
|
-
|
85
|
+
if attributes.key?(:'merchant_name')
|
86
|
+
self.merchant_name = attributes[:'merchant_name']
|
87
|
+
end
|
72
88
|
end
|
73
89
|
|
74
90
|
# Show invalid properties with the reasons. Usually used together with valid?
|
75
91
|
# @return Array for valid properties with the reasons
|
76
92
|
def list_invalid_properties
|
77
93
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
78
|
-
|
94
|
+
invalid_properties = Array.new
|
95
|
+
invalid_properties
|
79
96
|
end
|
80
97
|
|
81
98
|
# Check to see if the all the properties in the model are valid
|
@@ -87,20 +104,19 @@ module Api
|
|
87
104
|
|
88
105
|
# Checks equality by comparing each attribute.
|
89
106
|
# @param [Object] Object to be compared
|
90
|
-
def ==(
|
91
|
-
return true if equal?(
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
merchant_name == other.merchant_name
|
107
|
+
def ==(o)
|
108
|
+
return true if self.equal?(o)
|
109
|
+
self.class == o.class &&
|
110
|
+
customer == o.customer &&
|
111
|
+
email == o.email &&
|
112
|
+
deleted_at == o.deleted_at &&
|
113
|
+
merchant_name == o.merchant_name
|
98
114
|
end
|
99
115
|
|
100
116
|
# @see the `==` method
|
101
117
|
# @param [Object] Object to be compared
|
102
|
-
def eql?(
|
103
|
-
self ==
|
118
|
+
def eql?(o)
|
119
|
+
self == o
|
104
120
|
end
|
105
121
|
|
106
122
|
# Calculates hash code according to all attributes.
|
@@ -114,18 +130,19 @@ module Api
|
|
114
130
|
# @return [Object] Returns the model itself
|
115
131
|
def self.build_from_hash(attributes)
|
116
132
|
return nil unless attributes.is_a?(Hash)
|
117
|
-
|
118
133
|
attributes = attributes.transform_keys(&:to_sym)
|
119
134
|
transformed_hash = {}
|
120
135
|
openapi_types.each_pair do |key, type|
|
121
136
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
122
|
-
transformed_hash[key
|
137
|
+
transformed_hash["#{key}"] = nil
|
123
138
|
elsif type =~ /\AArray<(.*)>/i
|
124
139
|
# check to ensure the input is an array given that the attribute
|
125
140
|
# is documented as an array but the input is not
|
126
|
-
|
141
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
142
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
143
|
+
end
|
127
144
|
elsif !attributes[attribute_map[key]].nil?
|
128
|
-
transformed_hash[key
|
145
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
129
146
|
end
|
130
147
|
end
|
131
148
|
new(transformed_hash)
|
@@ -191,7 +208,7 @@ module Api
|
|
191
208
|
def to_hash
|
192
209
|
hash = {}
|
193
210
|
self.class.attribute_map.each_pair do |attr, param|
|
194
|
-
value = send(attr)
|
211
|
+
value = self.send(attr)
|
195
212
|
if value.nil?
|
196
213
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
197
214
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -219,5 +236,7 @@ module Api
|
|
219
236
|
value
|
220
237
|
end
|
221
238
|
end
|
239
|
+
|
222
240
|
end
|
241
|
+
|
223
242
|
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'
|
@@ -16,13 +16,15 @@ require 'time'
|
|
16
16
|
module Api
|
17
17
|
# This message represents a request to withdraw money from a customer. It contains the customer ID and the amount to withdraw.
|
18
18
|
class WithdrawRequest
|
19
|
-
attr_accessor :customer
|
19
|
+
attr_accessor :customer
|
20
|
+
|
21
|
+
attr_accessor :charge
|
20
22
|
|
21
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
24
|
def self.attribute_map
|
23
25
|
{
|
24
|
-
:customer => :customer,
|
25
|
-
:charge => :charge
|
26
|
+
:'customer' => :'customer',
|
27
|
+
:'charge' => :'charge'
|
26
28
|
}
|
27
29
|
end
|
28
30
|
|
@@ -34,40 +36,47 @@ module Api
|
|
34
36
|
# Attribute type mapping.
|
35
37
|
def self.openapi_types
|
36
38
|
{
|
37
|
-
:customer => :String,
|
38
|
-
:charge => :InitialCharge
|
39
|
+
:'customer' => :'String',
|
40
|
+
:'charge' => :'InitialCharge'
|
39
41
|
}
|
40
42
|
end
|
41
43
|
|
42
44
|
# List of attributes with nullable: true
|
43
45
|
def self.openapi_nullable
|
44
|
-
Set.new([
|
46
|
+
Set.new([
|
47
|
+
])
|
45
48
|
end
|
46
49
|
|
47
50
|
# Initializes the object
|
48
51
|
# @param [Hash] attributes Model attributes in the form of hash
|
49
52
|
def initialize(attributes = {})
|
50
|
-
|
53
|
+
if (!attributes.is_a?(Hash))
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::WithdrawRequest` initialize method"
|
55
|
+
end
|
51
56
|
|
52
57
|
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
-
attributes = attributes.each_with_object({})
|
54
|
-
|
55
|
-
|
58
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
59
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
60
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::WithdrawRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
61
|
+
end
|
56
62
|
h[k.to_sym] = v
|
57
|
-
|
58
|
-
|
59
|
-
self.customer = attributes[:customer] if attributes.key?(:customer)
|
63
|
+
}
|
60
64
|
|
61
|
-
|
65
|
+
if attributes.key?(:'customer')
|
66
|
+
self.customer = attributes[:'customer']
|
67
|
+
end
|
62
68
|
|
63
|
-
|
69
|
+
if attributes.key?(:'charge')
|
70
|
+
self.charge = attributes[:'charge']
|
71
|
+
end
|
64
72
|
end
|
65
73
|
|
66
74
|
# Show invalid properties with the reasons. Usually used together with valid?
|
67
75
|
# @return Array for valid properties with the reasons
|
68
76
|
def list_invalid_properties
|
69
77
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
70
|
-
|
78
|
+
invalid_properties = Array.new
|
79
|
+
invalid_properties
|
71
80
|
end
|
72
81
|
|
73
82
|
# Check to see if the all the properties in the model are valid
|
@@ -79,18 +88,17 @@ module Api
|
|
79
88
|
|
80
89
|
# Checks equality by comparing each attribute.
|
81
90
|
# @param [Object] Object to be compared
|
82
|
-
def ==(
|
83
|
-
return true if equal?(
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
charge == other.charge
|
91
|
+
def ==(o)
|
92
|
+
return true if self.equal?(o)
|
93
|
+
self.class == o.class &&
|
94
|
+
customer == o.customer &&
|
95
|
+
charge == o.charge
|
88
96
|
end
|
89
97
|
|
90
98
|
# @see the `==` method
|
91
99
|
# @param [Object] Object to be compared
|
92
|
-
def eql?(
|
93
|
-
self ==
|
100
|
+
def eql?(o)
|
101
|
+
self == o
|
94
102
|
end
|
95
103
|
|
96
104
|
# Calculates hash code according to all attributes.
|
@@ -104,18 +112,19 @@ module Api
|
|
104
112
|
# @return [Object] Returns the model itself
|
105
113
|
def self.build_from_hash(attributes)
|
106
114
|
return nil unless attributes.is_a?(Hash)
|
107
|
-
|
108
115
|
attributes = attributes.transform_keys(&:to_sym)
|
109
116
|
transformed_hash = {}
|
110
117
|
openapi_types.each_pair do |key, type|
|
111
118
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
112
|
-
transformed_hash[key
|
119
|
+
transformed_hash["#{key}"] = nil
|
113
120
|
elsif type =~ /\AArray<(.*)>/i
|
114
121
|
# check to ensure the input is an array given that the attribute
|
115
122
|
# is documented as an array but the input is not
|
116
|
-
|
123
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
124
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
125
|
+
end
|
117
126
|
elsif !attributes[attribute_map[key]].nil?
|
118
|
-
transformed_hash[key
|
127
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
119
128
|
end
|
120
129
|
end
|
121
130
|
new(transformed_hash)
|
@@ -181,7 +190,7 @@ module Api
|
|
181
190
|
def to_hash
|
182
191
|
hash = {}
|
183
192
|
self.class.attribute_map.each_pair do |attr, param|
|
184
|
-
value = send(attr)
|
193
|
+
value = self.send(attr)
|
185
194
|
if value.nil?
|
186
195
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
187
196
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -209,5 +218,7 @@ module Api
|
|
209
218
|
value
|
210
219
|
end
|
211
220
|
end
|
221
|
+
|
212
222
|
end
|
223
|
+
|
213
224
|
end
|