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,24 +1,27 @@
|
|
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 OnSessionPaymentError
|
18
|
-
attr_accessor :code
|
18
|
+
attr_accessor :code
|
19
|
+
|
20
|
+
attr_accessor :message
|
19
21
|
|
20
22
|
class EnumAttributeValidator
|
21
|
-
attr_reader :datatype
|
23
|
+
attr_reader :datatype
|
24
|
+
attr_reader :allowable_values
|
22
25
|
|
23
26
|
def initialize(datatype, allowable_values)
|
24
27
|
@allowable_values = allowable_values.map do |value|
|
@@ -41,8 +44,8 @@ module Api
|
|
41
44
|
# Attribute mapping from ruby-style variable name to JSON key.
|
42
45
|
def self.attribute_map
|
43
46
|
{
|
44
|
-
:code => :code,
|
45
|
-
:message => :message
|
47
|
+
:'code' => :'code',
|
48
|
+
:'message' => :'message'
|
46
49
|
}
|
47
50
|
end
|
48
51
|
|
@@ -54,44 +57,49 @@ module Api
|
|
54
57
|
# Attribute type mapping.
|
55
58
|
def self.openapi_types
|
56
59
|
{
|
57
|
-
:code => :OnSessionPaymentErrorCode,
|
58
|
-
:message => :String
|
60
|
+
:'code' => :'OnSessionPaymentErrorCode',
|
61
|
+
:'message' => :'String'
|
59
62
|
}
|
60
63
|
end
|
61
64
|
|
62
65
|
# List of attributes with nullable: true
|
63
66
|
def self.openapi_nullable
|
64
|
-
Set.new([
|
67
|
+
Set.new([
|
68
|
+
])
|
65
69
|
end
|
66
70
|
|
67
71
|
# Initializes the object
|
68
72
|
# @param [Hash] attributes Model attributes in the form of hash
|
69
73
|
def initialize(attributes = {})
|
70
|
-
|
74
|
+
if (!attributes.is_a?(Hash))
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::OnSessionPaymentError` initialize method"
|
76
|
+
end
|
71
77
|
|
72
78
|
# check to see if the attribute exists and convert string to symbol for hash key
|
73
|
-
attributes = attributes.each_with_object({})
|
74
|
-
|
75
|
-
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
80
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::OnSessionPaymentError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
82
|
+
end
|
76
83
|
h[k.to_sym] = v
|
77
|
-
|
78
|
-
|
79
|
-
self.code = if attributes.key?(:code)
|
80
|
-
attributes[:code]
|
81
|
-
else
|
82
|
-
'ON_SESSION_PAYMENT_ERROR_CODE_UNSPECIFIED'
|
83
|
-
end
|
84
|
+
}
|
84
85
|
|
85
|
-
|
86
|
+
if attributes.key?(:'code')
|
87
|
+
self.code = attributes[:'code']
|
88
|
+
else
|
89
|
+
self.code = 'ON_SESSION_PAYMENT_ERROR_CODE_UNSPECIFIED'
|
90
|
+
end
|
86
91
|
|
87
|
-
|
92
|
+
if attributes.key?(:'message')
|
93
|
+
self.message = attributes[:'message']
|
94
|
+
end
|
88
95
|
end
|
89
96
|
|
90
97
|
# Show invalid properties with the reasons. Usually used together with valid?
|
91
98
|
# @return Array for valid properties with the reasons
|
92
99
|
def list_invalid_properties
|
93
100
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
94
|
-
|
101
|
+
invalid_properties = Array.new
|
102
|
+
invalid_properties
|
95
103
|
end
|
96
104
|
|
97
105
|
# Check to see if the all the properties in the model are valid
|
@@ -103,18 +111,17 @@ module Api
|
|
103
111
|
|
104
112
|
# Checks equality by comparing each attribute.
|
105
113
|
# @param [Object] Object to be compared
|
106
|
-
def ==(
|
107
|
-
return true if equal?(
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
message == other.message
|
114
|
+
def ==(o)
|
115
|
+
return true if self.equal?(o)
|
116
|
+
self.class == o.class &&
|
117
|
+
code == o.code &&
|
118
|
+
message == o.message
|
112
119
|
end
|
113
120
|
|
114
121
|
# @see the `==` method
|
115
122
|
# @param [Object] Object to be compared
|
116
|
-
def eql?(
|
117
|
-
self ==
|
123
|
+
def eql?(o)
|
124
|
+
self == o
|
118
125
|
end
|
119
126
|
|
120
127
|
# Calculates hash code according to all attributes.
|
@@ -128,18 +135,19 @@ module Api
|
|
128
135
|
# @return [Object] Returns the model itself
|
129
136
|
def self.build_from_hash(attributes)
|
130
137
|
return nil unless attributes.is_a?(Hash)
|
131
|
-
|
132
138
|
attributes = attributes.transform_keys(&:to_sym)
|
133
139
|
transformed_hash = {}
|
134
140
|
openapi_types.each_pair do |key, type|
|
135
141
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
136
|
-
transformed_hash[key
|
142
|
+
transformed_hash["#{key}"] = nil
|
137
143
|
elsif type =~ /\AArray<(.*)>/i
|
138
144
|
# check to ensure the input is an array given that the attribute
|
139
145
|
# is documented as an array but the input is not
|
140
|
-
|
146
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
147
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
148
|
+
end
|
141
149
|
elsif !attributes[attribute_map[key]].nil?
|
142
|
-
transformed_hash[key
|
150
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
143
151
|
end
|
144
152
|
end
|
145
153
|
new(transformed_hash)
|
@@ -205,7 +213,7 @@ module Api
|
|
205
213
|
def to_hash
|
206
214
|
hash = {}
|
207
215
|
self.class.attribute_map.each_pair do |attr, param|
|
208
|
-
value = send(attr)
|
216
|
+
value = self.send(attr)
|
209
217
|
if value.nil?
|
210
218
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
211
219
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -233,5 +241,7 @@ module Api
|
|
233
241
|
value
|
234
242
|
end
|
235
243
|
end
|
244
|
+
|
236
245
|
end
|
246
|
+
|
237
247
|
end
|
@@ -1,30 +1,30 @@
|
|
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 OnSessionPaymentErrorCode
|
18
|
-
UNSPECIFIED =
|
19
|
-
MISSING_REDIRECT_URLS =
|
20
|
-
MISSING_REQUIRED_PARAMETERS =
|
21
|
-
MISSING_CHARGE =
|
22
|
-
CUSTOMER_NOT_FOUND =
|
23
|
-
CUSTOMER_INACTIVE =
|
24
|
-
MERCHANT_CUSTOMER_ALREADY_EXISTS =
|
25
|
-
VALIDATION_FAILED =
|
26
|
-
STRATEGY_EXECUTION_FAILED =
|
27
|
-
INVALID_PAYMENT_STRATEGY =
|
18
|
+
UNSPECIFIED = "ON_SESSION_PAYMENT_ERROR_CODE_UNSPECIFIED".freeze
|
19
|
+
MISSING_REDIRECT_URLS = "ON_SESSION_PAYMENT_ERROR_CODE_MISSING_REDIRECT_URLS".freeze
|
20
|
+
MISSING_REQUIRED_PARAMETERS = "ON_SESSION_PAYMENT_ERROR_CODE_MISSING_REQUIRED_PARAMETERS".freeze
|
21
|
+
MISSING_CHARGE = "ON_SESSION_PAYMENT_ERROR_CODE_MISSING_CHARGE".freeze
|
22
|
+
CUSTOMER_NOT_FOUND = "ON_SESSION_PAYMENT_ERROR_CODE_CUSTOMER_NOT_FOUND".freeze
|
23
|
+
CUSTOMER_INACTIVE = "ON_SESSION_PAYMENT_ERROR_CODE_CUSTOMER_INACTIVE".freeze
|
24
|
+
MERCHANT_CUSTOMER_ALREADY_EXISTS = "ON_SESSION_PAYMENT_ERROR_CODE_MERCHANT_CUSTOMER_ALREADY_EXISTS".freeze
|
25
|
+
VALIDATION_FAILED = "ON_SESSION_PAYMENT_ERROR_CODE_VALIDATION_FAILED".freeze
|
26
|
+
STRATEGY_EXECUTION_FAILED = "ON_SESSION_PAYMENT_ERROR_CODE_STRATEGY_EXECUTION_FAILED".freeze
|
27
|
+
INVALID_PAYMENT_STRATEGY = "ON_SESSION_PAYMENT_ERROR_CODE_INVALID_PAYMENT_STRATEGY".freeze
|
28
28
|
|
29
29
|
def self.all_vars
|
30
30
|
@all_vars ||= [UNSPECIFIED, MISSING_REDIRECT_URLS, MISSING_REQUIRED_PARAMETERS, MISSING_CHARGE, CUSTOMER_NOT_FOUND, CUSTOMER_INACTIVE, MERCHANT_CUSTOMER_ALREADY_EXISTS, VALIDATION_FAILED, STRATEGY_EXECUTION_FAILED, INVALID_PAYMENT_STRATEGY].freeze
|
@@ -42,7 +42,6 @@ module Api
|
|
42
42
|
# @return [String] The enum value
|
43
43
|
def build_from_hash(value)
|
44
44
|
return value if OnSessionPaymentErrorCode.all_vars.include?(value)
|
45
|
-
|
46
45
|
raise "Invalid ENUM value #{value} for class #OnSessionPaymentErrorCode"
|
47
46
|
end
|
48
47
|
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
|
# 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
|