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,15 +16,21 @@ require 'time'
|
|
16
16
|
module Api
|
17
17
|
# Request message for the unified payment interface. The system intelligently routes the request to the appropriate payment method based on the provided parameters.
|
18
18
|
class OnSessionPaymentRequest
|
19
|
-
attr_accessor :customer
|
19
|
+
attr_accessor :customer
|
20
|
+
|
21
|
+
attr_accessor :buyer
|
22
|
+
|
23
|
+
attr_accessor :charge
|
24
|
+
|
25
|
+
attr_accessor :redirect
|
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
|
-
:buyer => :buyer,
|
26
|
-
:charge => :charge,
|
27
|
-
:redirect => :redirect
|
30
|
+
:'customer' => :'customer',
|
31
|
+
:'buyer' => :'buyer',
|
32
|
+
:'charge' => :'charge',
|
33
|
+
:'redirect' => :'redirect'
|
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
|
-
:buyer => :Buyer,
|
41
|
-
:charge => :InitialCharge,
|
42
|
-
:redirect => :URL
|
45
|
+
:'customer' => :'String',
|
46
|
+
:'buyer' => :'Buyer',
|
47
|
+
:'charge' => :'InitialCharge',
|
48
|
+
:'redirect' => :'URL'
|
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::OnSessionPaymentRequest` 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::OnSessionPaymentRequest`. 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?(:'buyer')
|
78
|
+
self.buyer = attributes[:'buyer']
|
79
|
+
end
|
68
80
|
|
69
|
-
|
81
|
+
if attributes.key?(:'charge')
|
82
|
+
self.charge = attributes[:'charge']
|
83
|
+
end
|
70
84
|
|
71
|
-
|
85
|
+
if attributes.key?(:'redirect')
|
86
|
+
self.redirect = attributes[:'redirect']
|
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
|
-
redirect == other.redirect
|
107
|
+
def ==(o)
|
108
|
+
return true if self.equal?(o)
|
109
|
+
self.class == o.class &&
|
110
|
+
customer == o.customer &&
|
111
|
+
buyer == o.buyer &&
|
112
|
+
charge == o.charge &&
|
113
|
+
redirect == o.redirect
|
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,14 +16,18 @@ require 'time'
|
|
16
16
|
module Api
|
17
17
|
# Response message for the unified payment interface. Contains a standardized format with success/error pattern for consistent API responses.
|
18
18
|
class OnSessionPaymentResponse
|
19
|
-
attr_accessor :success
|
19
|
+
attr_accessor :success
|
20
|
+
|
21
|
+
attr_accessor :error
|
22
|
+
|
23
|
+
attr_accessor :data
|
20
24
|
|
21
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
26
|
def self.attribute_map
|
23
27
|
{
|
24
|
-
:success => :success,
|
25
|
-
:error => :error,
|
26
|
-
:data => :data
|
28
|
+
:'success' => :'success',
|
29
|
+
:'error' => :'error',
|
30
|
+
:'data' => :'data'
|
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
|
-
:success => :Boolean,
|
39
|
-
:error => :OnSessionPaymentError,
|
40
|
-
:data => :OnSessionPaymentData
|
42
|
+
:'success' => :'Boolean',
|
43
|
+
:'error' => :'OnSessionPaymentError',
|
44
|
+
:'data' => :'OnSessionPaymentData'
|
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::OnSessionPaymentResponse` 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::OnSessionPaymentResponse`. 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.success = attributes[:success] if attributes.key?(:success)
|
67
|
+
}
|
62
68
|
|
63
|
-
|
69
|
+
if attributes.key?(:'success')
|
70
|
+
self.success = attributes[:'success']
|
71
|
+
end
|
64
72
|
|
65
|
-
|
73
|
+
if attributes.key?(:'error')
|
74
|
+
self.error = attributes[:'error']
|
75
|
+
end
|
66
76
|
|
67
|
-
|
77
|
+
if attributes.key?(:'data')
|
78
|
+
self.data = attributes[:'data']
|
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
|
-
data == other.data
|
99
|
+
def ==(o)
|
100
|
+
return true if self.equal?(o)
|
101
|
+
self.class == o.class &&
|
102
|
+
success == o.success &&
|
103
|
+
error == o.error &&
|
104
|
+
data == o.data
|
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,27 +1,29 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
=begin
|
2
|
+
#Jamm API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.9.0
|
10
|
+
|
11
|
+
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Api
|
17
17
|
class Pagination
|
18
|
-
attr_accessor :page_size
|
18
|
+
attr_accessor :page_size
|
19
|
+
|
20
|
+
attr_accessor :page_token
|
19
21
|
|
20
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
21
23
|
def self.attribute_map
|
22
24
|
{
|
23
|
-
:page_size => :pageSize,
|
24
|
-
:page_token => :pageToken
|
25
|
+
:'page_size' => :'pageSize',
|
26
|
+
:'page_token' => :'pageToken'
|
25
27
|
}
|
26
28
|
end
|
27
29
|
|
@@ -33,40 +35,47 @@ module Api
|
|
33
35
|
# Attribute type mapping.
|
34
36
|
def self.openapi_types
|
35
37
|
{
|
36
|
-
:page_size => :Integer,
|
37
|
-
:page_token => :String
|
38
|
+
:'page_size' => :'Integer',
|
39
|
+
:'page_token' => :'String'
|
38
40
|
}
|
39
41
|
end
|
40
42
|
|
41
43
|
# List of attributes with nullable: true
|
42
44
|
def self.openapi_nullable
|
43
|
-
Set.new([
|
45
|
+
Set.new([
|
46
|
+
])
|
44
47
|
end
|
45
48
|
|
46
49
|
# Initializes the object
|
47
50
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
51
|
def initialize(attributes = {})
|
49
|
-
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::Pagination` initialize method"
|
54
|
+
end
|
50
55
|
|
51
56
|
# check to see if the attribute exists and convert string to symbol for hash key
|
52
|
-
attributes = attributes.each_with_object({})
|
53
|
-
|
54
|
-
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::Pagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
55
61
|
h[k.to_sym] = v
|
56
|
-
|
57
|
-
|
58
|
-
self.page_size = attributes[:page_size] if attributes.key?(:page_size)
|
62
|
+
}
|
59
63
|
|
60
|
-
|
64
|
+
if attributes.key?(:'page_size')
|
65
|
+
self.page_size = attributes[:'page_size']
|
66
|
+
end
|
61
67
|
|
62
|
-
|
68
|
+
if attributes.key?(:'page_token')
|
69
|
+
self.page_token = attributes[:'page_token']
|
70
|
+
end
|
63
71
|
end
|
64
72
|
|
65
73
|
# Show invalid properties with the reasons. Usually used together with valid?
|
66
74
|
# @return Array for valid properties with the reasons
|
67
75
|
def list_invalid_properties
|
68
76
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
69
|
-
|
77
|
+
invalid_properties = Array.new
|
78
|
+
invalid_properties
|
70
79
|
end
|
71
80
|
|
72
81
|
# Check to see if the all the properties in the model are valid
|
@@ -78,18 +87,17 @@ module Api
|
|
78
87
|
|
79
88
|
# Checks equality by comparing each attribute.
|
80
89
|
# @param [Object] Object to be compared
|
81
|
-
def ==(
|
82
|
-
return true if equal?(
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
page_token == other.page_token
|
90
|
+
def ==(o)
|
91
|
+
return true if self.equal?(o)
|
92
|
+
self.class == o.class &&
|
93
|
+
page_size == o.page_size &&
|
94
|
+
page_token == o.page_token
|
87
95
|
end
|
88
96
|
|
89
97
|
# @see the `==` method
|
90
98
|
# @param [Object] Object to be compared
|
91
|
-
def eql?(
|
92
|
-
self ==
|
99
|
+
def eql?(o)
|
100
|
+
self == o
|
93
101
|
end
|
94
102
|
|
95
103
|
# Calculates hash code according to all attributes.
|
@@ -103,18 +111,19 @@ module Api
|
|
103
111
|
# @return [Object] Returns the model itself
|
104
112
|
def self.build_from_hash(attributes)
|
105
113
|
return nil unless attributes.is_a?(Hash)
|
106
|
-
|
107
114
|
attributes = attributes.transform_keys(&:to_sym)
|
108
115
|
transformed_hash = {}
|
109
116
|
openapi_types.each_pair do |key, type|
|
110
117
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
111
|
-
transformed_hash[key
|
118
|
+
transformed_hash["#{key}"] = nil
|
112
119
|
elsif type =~ /\AArray<(.*)>/i
|
113
120
|
# check to ensure the input is an array given that the attribute
|
114
121
|
# is documented as an array but the input is not
|
115
|
-
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
124
|
+
end
|
116
125
|
elsif !attributes[attribute_map[key]].nil?
|
117
|
-
transformed_hash[key
|
126
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
118
127
|
end
|
119
128
|
end
|
120
129
|
new(transformed_hash)
|
@@ -180,7 +189,7 @@ module Api
|
|
180
189
|
def to_hash
|
181
190
|
hash = {}
|
182
191
|
self.class.attribute_map.each_pair do |attr, param|
|
183
|
-
value = send(attr)
|
192
|
+
value = self.send(attr)
|
184
193
|
if value.nil?
|
185
194
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
186
195
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -208,5 +217,7 @@ module Api
|
|
208
217
|
value
|
209
218
|
end
|
210
219
|
end
|
220
|
+
|
211
221
|
end
|
222
|
+
|
212
223
|
end
|
@@ -1,23 +1,23 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
=begin
|
2
|
+
#Jamm API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.9.0
|
10
|
+
|
11
|
+
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Api
|
17
17
|
class PaymentAuthorizationStatus
|
18
|
-
UNSPECIFIED =
|
19
|
-
AUTHORIZED =
|
20
|
-
NOT_AUTHORIZED =
|
18
|
+
UNSPECIFIED = "PAYMENT_AUTHORIZATION_STATUS_UNSPECIFIED".freeze
|
19
|
+
AUTHORIZED = "PAYMENT_AUTHORIZATION_STATUS_AUTHORIZED".freeze
|
20
|
+
NOT_AUTHORIZED = "PAYMENT_AUTHORIZATION_STATUS_NOT_AUTHORIZED".freeze
|
21
21
|
|
22
22
|
def self.all_vars
|
23
23
|
@all_vars ||= [UNSPECIFIED, AUTHORIZED, NOT_AUTHORIZED].freeze
|
@@ -35,7 +35,6 @@ module Api
|
|
35
35
|
# @return [String] The enum value
|
36
36
|
def build_from_hash(value)
|
37
37
|
return value if PaymentAuthorizationStatus.all_vars.include?(value)
|
38
|
-
|
39
38
|
raise "Invalid ENUM value #{value} for class #PaymentAuthorizationStatus"
|
40
39
|
end
|
41
40
|
end
|