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'
|
@@ -16,13 +16,15 @@ require 'time'
|
|
16
16
|
module Api
|
17
17
|
# Request message for creating a new contract without an initial charge. This is typically used when setting up a billing relationship before any actual charges are processed.
|
18
18
|
class CreateContractWithoutChargeRequest
|
19
|
-
attr_accessor :buyer
|
19
|
+
attr_accessor :buyer
|
20
|
+
|
21
|
+
attr_accessor :redirect
|
20
22
|
|
21
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
24
|
def self.attribute_map
|
23
25
|
{
|
24
|
-
:buyer => :buyer,
|
25
|
-
:redirect => :redirect
|
26
|
+
:'buyer' => :'buyer',
|
27
|
+
:'redirect' => :'redirect'
|
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
|
-
:buyer => :Buyer,
|
38
|
-
:redirect => :URL
|
39
|
+
:'buyer' => :'Buyer',
|
40
|
+
:'redirect' => :'URL'
|
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::CreateContractWithoutChargeRequest` 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::CreateContractWithoutChargeRequest`. 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.buyer = attributes[:buyer] if attributes.key?(:buyer)
|
63
|
+
}
|
60
64
|
|
61
|
-
|
65
|
+
if attributes.key?(:'buyer')
|
66
|
+
self.buyer = attributes[:'buyer']
|
67
|
+
end
|
62
68
|
|
63
|
-
|
69
|
+
if attributes.key?(:'redirect')
|
70
|
+
self.redirect = attributes[:'redirect']
|
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
|
-
redirect == other.redirect
|
91
|
+
def ==(o)
|
92
|
+
return true if self.equal?(o)
|
93
|
+
self.class == o.class &&
|
94
|
+
buyer == o.buyer &&
|
95
|
+
redirect == o.redirect
|
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
|
@@ -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
|
# Response message after successfully creating a contract without a charge. Contains all the information needed for subsequent interactions with the contract and customer.
|
18
18
|
class CreateContractWithoutChargeResponse
|
19
|
-
attr_accessor :contract
|
19
|
+
attr_accessor :contract
|
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
|
-
:contract => :contract,
|
25
|
-
:customer => :customer,
|
26
|
-
:payment_link => :paymentLink
|
28
|
+
:'contract' => :'contract',
|
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
|
-
:contract => :Contract,
|
39
|
-
:customer => :Customer,
|
40
|
-
:payment_link => :PaymentLink
|
42
|
+
:'contract' => :'Contract',
|
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::CreateContractWithoutChargeResponse` 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::CreateContractWithoutChargeResponse`. 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.contract = attributes[:contract] if attributes.key?(:contract)
|
67
|
+
}
|
62
68
|
|
63
|
-
|
69
|
+
if attributes.key?(:'contract')
|
70
|
+
self.contract = attributes[:'contract']
|
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
|
+
contract == o.contract &&
|
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
|
@@ -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
|
-
:buyer => :buyer
|
23
|
+
:'buyer' => :'buyer'
|
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
|
-
:buyer => :Buyer
|
35
|
+
:'buyer' => :'Buyer'
|
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::CreateCustomerRequest` 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::CreateCustomerRequest`. 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?(:buyer)
|
58
|
+
}
|
57
59
|
|
58
|
-
|
60
|
+
if attributes.key?(:'buyer')
|
61
|
+
self.buyer = attributes[:'buyer']
|
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
|
-
buyer == other.buyer
|
82
|
+
def ==(o)
|
83
|
+
return true if self.equal?(o)
|
84
|
+
self.class == o.class &&
|
85
|
+
buyer == o.buyer
|
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
|
-
:customer => :customer
|
23
|
+
:'customer' => :'customer'
|
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
|
-
:customer => :MerchantCustomer
|
35
|
+
:'customer' => :'MerchantCustomer'
|
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::CreateCustomerResponse` 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::CreateCustomerResponse`. 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?(:customer)
|
58
|
+
}
|
57
59
|
|
58
|
-
|
60
|
+
if attributes.key?(:'customer')
|
61
|
+
self.customer = attributes[:'customer']
|
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
|
-
customer == other.customer
|
82
|
+
def ==(o)
|
83
|
+
return true if self.equal?(o)
|
84
|
+
self.class == o.class &&
|
85
|
+
customer == o.customer
|
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
|