jamm 1.3.0 → 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 +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 +4 -2
@@ -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'
|
@@ -22,7 +22,7 @@ module Api
|
|
22
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
23
|
def self.attribute_map
|
24
24
|
{
|
25
|
-
:type => :'@type'
|
25
|
+
:'type' => :'@type'
|
26
26
|
}
|
27
27
|
end
|
28
28
|
|
@@ -34,37 +34,42 @@ module Api
|
|
34
34
|
# Attribute type mapping.
|
35
35
|
def self.openapi_types
|
36
36
|
{
|
37
|
-
:type => :String
|
37
|
+
:'type' => :'String'
|
38
38
|
}
|
39
39
|
end
|
40
40
|
|
41
41
|
# List of attributes with nullable: true
|
42
42
|
def self.openapi_nullable
|
43
|
-
Set.new([
|
43
|
+
Set.new([
|
44
|
+
])
|
44
45
|
end
|
45
46
|
|
46
47
|
# Initializes the object
|
47
48
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
49
|
def initialize(attributes = {})
|
49
|
-
|
50
|
+
if (!attributes.is_a?(Hash))
|
51
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::ProtobufAny` initialize method"
|
52
|
+
end
|
50
53
|
|
51
54
|
# check to see if the attribute exists and convert string to symbol for hash key
|
52
|
-
attributes = attributes.each_with_object({})
|
53
|
-
|
54
|
-
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
56
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
57
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::ProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
58
|
+
end
|
55
59
|
h[k.to_sym] = v
|
56
|
-
|
57
|
-
|
58
|
-
return unless attributes.key?(:type)
|
60
|
+
}
|
59
61
|
|
60
|
-
|
62
|
+
if attributes.key?(:'type')
|
63
|
+
self.type = attributes[:'type']
|
64
|
+
end
|
61
65
|
end
|
62
66
|
|
63
67
|
# Show invalid properties with the reasons. Usually used together with valid?
|
64
68
|
# @return Array for valid properties with the reasons
|
65
69
|
def list_invalid_properties
|
66
70
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
67
|
-
|
71
|
+
invalid_properties = Array.new
|
72
|
+
invalid_properties
|
68
73
|
end
|
69
74
|
|
70
75
|
# Check to see if the all the properties in the model are valid
|
@@ -76,17 +81,16 @@ module Api
|
|
76
81
|
|
77
82
|
# Checks equality by comparing each attribute.
|
78
83
|
# @param [Object] Object to be compared
|
79
|
-
def ==(
|
80
|
-
return true if equal?(
|
81
|
-
|
82
|
-
|
83
|
-
type == other.type
|
84
|
+
def ==(o)
|
85
|
+
return true if self.equal?(o)
|
86
|
+
self.class == o.class &&
|
87
|
+
type == o.type
|
84
88
|
end
|
85
89
|
|
86
90
|
# @see the `==` method
|
87
91
|
# @param [Object] Object to be compared
|
88
|
-
def eql?(
|
89
|
-
self ==
|
92
|
+
def eql?(o)
|
93
|
+
self == o
|
90
94
|
end
|
91
95
|
|
92
96
|
# Calculates hash code according to all attributes.
|
@@ -100,18 +104,19 @@ module Api
|
|
100
104
|
# @return [Object] Returns the model itself
|
101
105
|
def self.build_from_hash(attributes)
|
102
106
|
return nil unless attributes.is_a?(Hash)
|
103
|
-
|
104
107
|
attributes = attributes.transform_keys(&:to_sym)
|
105
108
|
transformed_hash = {}
|
106
109
|
openapi_types.each_pair do |key, type|
|
107
110
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
108
|
-
transformed_hash[key
|
111
|
+
transformed_hash["#{key}"] = nil
|
109
112
|
elsif type =~ /\AArray<(.*)>/i
|
110
113
|
# check to ensure the input is an array given that the attribute
|
111
114
|
# is documented as an array but the input is not
|
112
|
-
|
115
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
116
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
117
|
+
end
|
113
118
|
elsif !attributes[attribute_map[key]].nil?
|
114
|
-
transformed_hash[key
|
119
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
115
120
|
end
|
116
121
|
end
|
117
122
|
new(transformed_hash)
|
@@ -177,7 +182,7 @@ module Api
|
|
177
182
|
def to_hash
|
178
183
|
hash = {}
|
179
184
|
self.class.attribute_map.each_pair do |attr, param|
|
180
|
-
value = send(attr)
|
185
|
+
value = self.send(attr)
|
181
186
|
if value.nil?
|
182
187
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
183
188
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -205,5 +210,7 @@ module Api
|
|
205
210
|
value
|
206
211
|
end
|
207
212
|
end
|
213
|
+
|
208
214
|
end
|
215
|
+
|
209
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'
|
@@ -16,14 +16,18 @@ require 'time'
|
|
16
16
|
module Api
|
17
17
|
# This message represents a request to add a charge to an existing customer. It contains all necessary information to process a new payment transaction.
|
18
18
|
class AddChargeRequest
|
19
|
-
attr_accessor :customer
|
19
|
+
attr_accessor :customer
|
20
|
+
|
21
|
+
attr_accessor :charge
|
22
|
+
|
23
|
+
attr_accessor :redirect
|
20
24
|
|
21
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
26
|
def self.attribute_map
|
23
27
|
{
|
24
|
-
:customer => :customer,
|
25
|
-
:charge => :charge,
|
26
|
-
:redirect => :redirect
|
28
|
+
:'customer' => :'customer',
|
29
|
+
:'charge' => :'charge',
|
30
|
+
:'redirect' => :'redirect'
|
27
31
|
}
|
28
32
|
end
|
29
33
|
|
@@ -35,43 +39,52 @@ module Api
|
|
35
39
|
# Attribute type mapping.
|
36
40
|
def self.openapi_types
|
37
41
|
{
|
38
|
-
:customer => :String,
|
39
|
-
:charge => :InitialCharge,
|
40
|
-
:redirect => :URL
|
42
|
+
:'customer' => :'String',
|
43
|
+
:'charge' => :'InitialCharge',
|
44
|
+
:'redirect' => :'URL'
|
41
45
|
}
|
42
46
|
end
|
43
47
|
|
44
48
|
# List of attributes with nullable: true
|
45
49
|
def self.openapi_nullable
|
46
|
-
Set.new([
|
50
|
+
Set.new([
|
51
|
+
])
|
47
52
|
end
|
48
53
|
|
49
54
|
# Initializes the object
|
50
55
|
# @param [Hash] attributes Model attributes in the form of hash
|
51
56
|
def initialize(attributes = {})
|
52
|
-
|
57
|
+
if (!attributes.is_a?(Hash))
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::AddChargeRequest` initialize method"
|
59
|
+
end
|
53
60
|
|
54
61
|
# check to see if the attribute exists and convert string to symbol for hash key
|
55
|
-
attributes = attributes.each_with_object({})
|
56
|
-
|
57
|
-
|
62
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
63
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
64
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::AddChargeRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
65
|
+
end
|
58
66
|
h[k.to_sym] = v
|
59
|
-
|
60
|
-
|
61
|
-
self.customer = attributes[:customer] if attributes.key?(:customer)
|
67
|
+
}
|
62
68
|
|
63
|
-
|
69
|
+
if attributes.key?(:'customer')
|
70
|
+
self.customer = attributes[:'customer']
|
71
|
+
end
|
64
72
|
|
65
|
-
|
73
|
+
if attributes.key?(:'charge')
|
74
|
+
self.charge = attributes[:'charge']
|
75
|
+
end
|
66
76
|
|
67
|
-
|
77
|
+
if attributes.key?(:'redirect')
|
78
|
+
self.redirect = attributes[:'redirect']
|
79
|
+
end
|
68
80
|
end
|
69
81
|
|
70
82
|
# Show invalid properties with the reasons. Usually used together with valid?
|
71
83
|
# @return Array for valid properties with the reasons
|
72
84
|
def list_invalid_properties
|
73
85
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
74
|
-
|
86
|
+
invalid_properties = Array.new
|
87
|
+
invalid_properties
|
75
88
|
end
|
76
89
|
|
77
90
|
# Check to see if the all the properties in the model are valid
|
@@ -83,19 +96,18 @@ module Api
|
|
83
96
|
|
84
97
|
# Checks equality by comparing each attribute.
|
85
98
|
# @param [Object] Object to be compared
|
86
|
-
def ==(
|
87
|
-
return true if equal?(
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
redirect == other.redirect
|
99
|
+
def ==(o)
|
100
|
+
return true if self.equal?(o)
|
101
|
+
self.class == o.class &&
|
102
|
+
customer == o.customer &&
|
103
|
+
charge == o.charge &&
|
104
|
+
redirect == o.redirect
|
93
105
|
end
|
94
106
|
|
95
107
|
# @see the `==` method
|
96
108
|
# @param [Object] Object to be compared
|
97
|
-
def eql?(
|
98
|
-
self ==
|
109
|
+
def eql?(o)
|
110
|
+
self == o
|
99
111
|
end
|
100
112
|
|
101
113
|
# Calculates hash code according to all attributes.
|
@@ -109,18 +121,19 @@ module Api
|
|
109
121
|
# @return [Object] Returns the model itself
|
110
122
|
def self.build_from_hash(attributes)
|
111
123
|
return nil unless attributes.is_a?(Hash)
|
112
|
-
|
113
124
|
attributes = attributes.transform_keys(&:to_sym)
|
114
125
|
transformed_hash = {}
|
115
126
|
openapi_types.each_pair do |key, type|
|
116
127
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
117
|
-
transformed_hash[key
|
128
|
+
transformed_hash["#{key}"] = nil
|
118
129
|
elsif type =~ /\AArray<(.*)>/i
|
119
130
|
# check to ensure the input is an array given that the attribute
|
120
131
|
# is documented as an array but the input is not
|
121
|
-
|
132
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
133
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
134
|
+
end
|
122
135
|
elsif !attributes[attribute_map[key]].nil?
|
123
|
-
transformed_hash[key
|
136
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
124
137
|
end
|
125
138
|
end
|
126
139
|
new(transformed_hash)
|
@@ -186,7 +199,7 @@ module Api
|
|
186
199
|
def to_hash
|
187
200
|
hash = {}
|
188
201
|
self.class.attribute_map.each_pair do |attr, param|
|
189
|
-
value = send(attr)
|
202
|
+
value = self.send(attr)
|
190
203
|
if value.nil?
|
191
204
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
192
205
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -214,5 +227,7 @@ module Api
|
|
214
227
|
value
|
215
228
|
end
|
216
229
|
end
|
230
|
+
|
217
231
|
end
|
232
|
+
|
218
233
|
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,14 +16,18 @@ require 'time'
|
|
16
16
|
module Api
|
17
17
|
# This message represents the response after processing an AddChargeRequest. It contains information about the created charge, customer details, and a payment link that can be used to complete the payment if needed.
|
18
18
|
class AddChargeResponse
|
19
|
-
attr_accessor :charge
|
19
|
+
attr_accessor :charge
|
20
|
+
|
21
|
+
attr_accessor :customer
|
22
|
+
|
23
|
+
attr_accessor :payment_link
|
20
24
|
|
21
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
26
|
def self.attribute_map
|
23
27
|
{
|
24
|
-
:charge => :charge,
|
25
|
-
:customer => :customer,
|
26
|
-
:payment_link => :paymentLink
|
28
|
+
:'charge' => :'charge',
|
29
|
+
:'customer' => :'customer',
|
30
|
+
:'payment_link' => :'paymentLink'
|
27
31
|
}
|
28
32
|
end
|
29
33
|
|
@@ -35,43 +39,52 @@ module Api
|
|
35
39
|
# Attribute type mapping.
|
36
40
|
def self.openapi_types
|
37
41
|
{
|
38
|
-
:charge => :Charge,
|
39
|
-
:customer => :Customer,
|
40
|
-
:payment_link => :PaymentLink
|
42
|
+
:'charge' => :'Charge',
|
43
|
+
:'customer' => :'Customer',
|
44
|
+
:'payment_link' => :'PaymentLink'
|
41
45
|
}
|
42
46
|
end
|
43
47
|
|
44
48
|
# List of attributes with nullable: true
|
45
49
|
def self.openapi_nullable
|
46
|
-
Set.new([
|
50
|
+
Set.new([
|
51
|
+
])
|
47
52
|
end
|
48
53
|
|
49
54
|
# Initializes the object
|
50
55
|
# @param [Hash] attributes Model attributes in the form of hash
|
51
56
|
def initialize(attributes = {})
|
52
|
-
|
57
|
+
if (!attributes.is_a?(Hash))
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::AddChargeResponse` initialize method"
|
59
|
+
end
|
53
60
|
|
54
61
|
# check to see if the attribute exists and convert string to symbol for hash key
|
55
|
-
attributes = attributes.each_with_object({})
|
56
|
-
|
57
|
-
|
62
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
63
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
64
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::AddChargeResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
65
|
+
end
|
58
66
|
h[k.to_sym] = v
|
59
|
-
|
60
|
-
|
61
|
-
self.charge = attributes[:charge] if attributes.key?(:charge)
|
67
|
+
}
|
62
68
|
|
63
|
-
|
69
|
+
if attributes.key?(:'charge')
|
70
|
+
self.charge = attributes[:'charge']
|
71
|
+
end
|
64
72
|
|
65
|
-
|
73
|
+
if attributes.key?(:'customer')
|
74
|
+
self.customer = attributes[:'customer']
|
75
|
+
end
|
66
76
|
|
67
|
-
|
77
|
+
if attributes.key?(:'payment_link')
|
78
|
+
self.payment_link = attributes[:'payment_link']
|
79
|
+
end
|
68
80
|
end
|
69
81
|
|
70
82
|
# Show invalid properties with the reasons. Usually used together with valid?
|
71
83
|
# @return Array for valid properties with the reasons
|
72
84
|
def list_invalid_properties
|
73
85
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
74
|
-
|
86
|
+
invalid_properties = Array.new
|
87
|
+
invalid_properties
|
75
88
|
end
|
76
89
|
|
77
90
|
# Check to see if the all the properties in the model are valid
|
@@ -83,19 +96,18 @@ module Api
|
|
83
96
|
|
84
97
|
# Checks equality by comparing each attribute.
|
85
98
|
# @param [Object] Object to be compared
|
86
|
-
def ==(
|
87
|
-
return true if equal?(
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
payment_link == other.payment_link
|
99
|
+
def ==(o)
|
100
|
+
return true if self.equal?(o)
|
101
|
+
self.class == o.class &&
|
102
|
+
charge == o.charge &&
|
103
|
+
customer == o.customer &&
|
104
|
+
payment_link == o.payment_link
|
93
105
|
end
|
94
106
|
|
95
107
|
# @see the `==` method
|
96
108
|
# @param [Object] Object to be compared
|
97
|
-
def eql?(
|
98
|
-
self ==
|
109
|
+
def eql?(o)
|
110
|
+
self == o
|
99
111
|
end
|
100
112
|
|
101
113
|
# Calculates hash code according to all attributes.
|
@@ -109,18 +121,19 @@ module Api
|
|
109
121
|
# @return [Object] Returns the model itself
|
110
122
|
def self.build_from_hash(attributes)
|
111
123
|
return nil unless attributes.is_a?(Hash)
|
112
|
-
|
113
124
|
attributes = attributes.transform_keys(&:to_sym)
|
114
125
|
transformed_hash = {}
|
115
126
|
openapi_types.each_pair do |key, type|
|
116
127
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
117
|
-
transformed_hash[key
|
128
|
+
transformed_hash["#{key}"] = nil
|
118
129
|
elsif type =~ /\AArray<(.*)>/i
|
119
130
|
# check to ensure the input is an array given that the attribute
|
120
131
|
# is documented as an array but the input is not
|
121
|
-
|
132
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
133
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
134
|
+
end
|
122
135
|
elsif !attributes[attribute_map[key]].nil?
|
123
|
-
transformed_hash[key
|
136
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
124
137
|
end
|
125
138
|
end
|
126
139
|
new(transformed_hash)
|
@@ -186,7 +199,7 @@ module Api
|
|
186
199
|
def to_hash
|
187
200
|
hash = {}
|
188
201
|
self.class.attribute_map.each_pair do |attr, param|
|
189
|
-
value = send(attr)
|
202
|
+
value = self.send(attr)
|
190
203
|
if value.nil?
|
191
204
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
192
205
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -214,5 +227,7 @@ module Api
|
|
214
227
|
value
|
215
228
|
end
|
216
229
|
end
|
230
|
+
|
217
231
|
end
|
232
|
+
|
218
233
|
end
|