jamm 1.3.0 → 1.4.1
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/jamm.gemspec +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 +5 -3
@@ -1,24 +1,51 @@
|
|
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 ChargeMessage
|
18
|
-
attr_accessor :id
|
18
|
+
attr_accessor :id
|
19
|
+
|
20
|
+
attr_accessor :customer
|
21
|
+
|
22
|
+
attr_accessor :status
|
23
|
+
|
24
|
+
attr_accessor :description
|
25
|
+
|
26
|
+
attr_accessor :merchant_name
|
27
|
+
|
28
|
+
attr_accessor :initial_amount
|
29
|
+
|
30
|
+
attr_accessor :discount
|
31
|
+
|
32
|
+
attr_accessor :final_amount
|
33
|
+
|
34
|
+
attr_accessor :amount_refunded
|
35
|
+
|
36
|
+
attr_accessor :currency
|
37
|
+
|
38
|
+
attr_accessor :processed_at
|
39
|
+
|
40
|
+
attr_accessor :created_at
|
41
|
+
|
42
|
+
attr_accessor :updated_at
|
43
|
+
|
44
|
+
attr_accessor :error
|
19
45
|
|
20
46
|
class EnumAttributeValidator
|
21
|
-
attr_reader :datatype
|
47
|
+
attr_reader :datatype
|
48
|
+
attr_reader :allowable_values
|
22
49
|
|
23
50
|
def initialize(datatype, allowable_values)
|
24
51
|
@allowable_values = allowable_values.map do |value|
|
@@ -41,20 +68,20 @@ module Api
|
|
41
68
|
# Attribute mapping from ruby-style variable name to JSON key.
|
42
69
|
def self.attribute_map
|
43
70
|
{
|
44
|
-
:id => :id,
|
45
|
-
:customer => :customer,
|
46
|
-
:status => :status,
|
47
|
-
:description => :description,
|
48
|
-
:merchant_name => :merchantName,
|
49
|
-
:initial_amount => :initialAmount,
|
50
|
-
:discount => :discount,
|
51
|
-
:final_amount => :finalAmount,
|
52
|
-
:amount_refunded => :amountRefunded,
|
53
|
-
:currency => :currency,
|
54
|
-
:processed_at => :processedAt,
|
55
|
-
:created_at => :createdAt,
|
56
|
-
:updated_at => :updatedAt,
|
57
|
-
:error => :error
|
71
|
+
:'id' => :'id',
|
72
|
+
:'customer' => :'customer',
|
73
|
+
:'status' => :'status',
|
74
|
+
:'description' => :'description',
|
75
|
+
:'merchant_name' => :'merchantName',
|
76
|
+
:'initial_amount' => :'initialAmount',
|
77
|
+
:'discount' => :'discount',
|
78
|
+
:'final_amount' => :'finalAmount',
|
79
|
+
:'amount_refunded' => :'amountRefunded',
|
80
|
+
:'currency' => :'currency',
|
81
|
+
:'processed_at' => :'processedAt',
|
82
|
+
:'created_at' => :'createdAt',
|
83
|
+
:'updated_at' => :'updatedAt',
|
84
|
+
:'error' => :'error'
|
58
85
|
}
|
59
86
|
end
|
60
87
|
|
@@ -66,80 +93,109 @@ module Api
|
|
66
93
|
# Attribute type mapping.
|
67
94
|
def self.openapi_types
|
68
95
|
{
|
69
|
-
:id => :String,
|
70
|
-
:customer => :String,
|
71
|
-
:status => :ChargeMessageStatus,
|
72
|
-
:description => :String,
|
73
|
-
:merchant_name => :String,
|
74
|
-
:initial_amount => :Integer,
|
75
|
-
:discount => :Integer,
|
76
|
-
:final_amount => :Integer,
|
77
|
-
:amount_refunded => :Integer,
|
78
|
-
:currency => :String,
|
79
|
-
:processed_at => :String,
|
80
|
-
:created_at => :String,
|
81
|
-
:updated_at => :String,
|
82
|
-
:error => :Apiv1Error
|
96
|
+
:'id' => :'String',
|
97
|
+
:'customer' => :'String',
|
98
|
+
:'status' => :'ChargeMessageStatus',
|
99
|
+
:'description' => :'String',
|
100
|
+
:'merchant_name' => :'String',
|
101
|
+
:'initial_amount' => :'Integer',
|
102
|
+
:'discount' => :'Integer',
|
103
|
+
:'final_amount' => :'Integer',
|
104
|
+
:'amount_refunded' => :'Integer',
|
105
|
+
:'currency' => :'String',
|
106
|
+
:'processed_at' => :'String',
|
107
|
+
:'created_at' => :'String',
|
108
|
+
:'updated_at' => :'String',
|
109
|
+
:'error' => :'Apiv1Error'
|
83
110
|
}
|
84
111
|
end
|
85
112
|
|
86
113
|
# List of attributes with nullable: true
|
87
114
|
def self.openapi_nullable
|
88
|
-
Set.new([
|
115
|
+
Set.new([
|
116
|
+
])
|
89
117
|
end
|
90
118
|
|
91
119
|
# Initializes the object
|
92
120
|
# @param [Hash] attributes Model attributes in the form of hash
|
93
121
|
def initialize(attributes = {})
|
94
|
-
|
122
|
+
if (!attributes.is_a?(Hash))
|
123
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::ChargeMessage` initialize method"
|
124
|
+
end
|
95
125
|
|
96
126
|
# check to see if the attribute exists and convert string to symbol for hash key
|
97
|
-
attributes = attributes.each_with_object({})
|
98
|
-
|
99
|
-
|
127
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
128
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
129
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::ChargeMessage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
130
|
+
end
|
100
131
|
h[k.to_sym] = v
|
101
|
-
|
102
|
-
|
103
|
-
self.id = attributes[:id] if attributes.key?(:id)
|
132
|
+
}
|
104
133
|
|
105
|
-
|
134
|
+
if attributes.key?(:'id')
|
135
|
+
self.id = attributes[:'id']
|
136
|
+
end
|
106
137
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
'STATUS_UNSPECIFIED'
|
111
|
-
end
|
138
|
+
if attributes.key?(:'customer')
|
139
|
+
self.customer = attributes[:'customer']
|
140
|
+
end
|
112
141
|
|
113
|
-
|
142
|
+
if attributes.key?(:'status')
|
143
|
+
self.status = attributes[:'status']
|
144
|
+
else
|
145
|
+
self.status = 'STATUS_UNSPECIFIED'
|
146
|
+
end
|
114
147
|
|
115
|
-
|
148
|
+
if attributes.key?(:'description')
|
149
|
+
self.description = attributes[:'description']
|
150
|
+
end
|
116
151
|
|
117
|
-
|
152
|
+
if attributes.key?(:'merchant_name')
|
153
|
+
self.merchant_name = attributes[:'merchant_name']
|
154
|
+
end
|
118
155
|
|
119
|
-
|
156
|
+
if attributes.key?(:'initial_amount')
|
157
|
+
self.initial_amount = attributes[:'initial_amount']
|
158
|
+
end
|
120
159
|
|
121
|
-
|
160
|
+
if attributes.key?(:'discount')
|
161
|
+
self.discount = attributes[:'discount']
|
162
|
+
end
|
122
163
|
|
123
|
-
|
164
|
+
if attributes.key?(:'final_amount')
|
165
|
+
self.final_amount = attributes[:'final_amount']
|
166
|
+
end
|
124
167
|
|
125
|
-
|
168
|
+
if attributes.key?(:'amount_refunded')
|
169
|
+
self.amount_refunded = attributes[:'amount_refunded']
|
170
|
+
end
|
126
171
|
|
127
|
-
|
172
|
+
if attributes.key?(:'currency')
|
173
|
+
self.currency = attributes[:'currency']
|
174
|
+
end
|
128
175
|
|
129
|
-
|
176
|
+
if attributes.key?(:'processed_at')
|
177
|
+
self.processed_at = attributes[:'processed_at']
|
178
|
+
end
|
130
179
|
|
131
|
-
|
180
|
+
if attributes.key?(:'created_at')
|
181
|
+
self.created_at = attributes[:'created_at']
|
182
|
+
end
|
132
183
|
|
133
|
-
|
184
|
+
if attributes.key?(:'updated_at')
|
185
|
+
self.updated_at = attributes[:'updated_at']
|
186
|
+
end
|
134
187
|
|
135
|
-
|
188
|
+
if attributes.key?(:'error')
|
189
|
+
self.error = attributes[:'error']
|
190
|
+
end
|
136
191
|
end
|
137
192
|
|
138
193
|
# Show invalid properties with the reasons. Usually used together with valid?
|
139
194
|
# @return Array for valid properties with the reasons
|
140
195
|
def list_invalid_properties
|
141
196
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
142
|
-
|
197
|
+
invalid_properties = Array.new
|
198
|
+
invalid_properties
|
143
199
|
end
|
144
200
|
|
145
201
|
# Check to see if the all the properties in the model are valid
|
@@ -151,30 +207,29 @@ module Api
|
|
151
207
|
|
152
208
|
# Checks equality by comparing each attribute.
|
153
209
|
# @param [Object] Object to be compared
|
154
|
-
def ==(
|
155
|
-
return true if equal?(
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
error == other.error
|
210
|
+
def ==(o)
|
211
|
+
return true if self.equal?(o)
|
212
|
+
self.class == o.class &&
|
213
|
+
id == o.id &&
|
214
|
+
customer == o.customer &&
|
215
|
+
status == o.status &&
|
216
|
+
description == o.description &&
|
217
|
+
merchant_name == o.merchant_name &&
|
218
|
+
initial_amount == o.initial_amount &&
|
219
|
+
discount == o.discount &&
|
220
|
+
final_amount == o.final_amount &&
|
221
|
+
amount_refunded == o.amount_refunded &&
|
222
|
+
currency == o.currency &&
|
223
|
+
processed_at == o.processed_at &&
|
224
|
+
created_at == o.created_at &&
|
225
|
+
updated_at == o.updated_at &&
|
226
|
+
error == o.error
|
172
227
|
end
|
173
228
|
|
174
229
|
# @see the `==` method
|
175
230
|
# @param [Object] Object to be compared
|
176
|
-
def eql?(
|
177
|
-
self ==
|
231
|
+
def eql?(o)
|
232
|
+
self == o
|
178
233
|
end
|
179
234
|
|
180
235
|
# Calculates hash code according to all attributes.
|
@@ -188,18 +243,19 @@ module Api
|
|
188
243
|
# @return [Object] Returns the model itself
|
189
244
|
def self.build_from_hash(attributes)
|
190
245
|
return nil unless attributes.is_a?(Hash)
|
191
|
-
|
192
246
|
attributes = attributes.transform_keys(&:to_sym)
|
193
247
|
transformed_hash = {}
|
194
248
|
openapi_types.each_pair do |key, type|
|
195
249
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
196
|
-
transformed_hash[key
|
250
|
+
transformed_hash["#{key}"] = nil
|
197
251
|
elsif type =~ /\AArray<(.*)>/i
|
198
252
|
# check to ensure the input is an array given that the attribute
|
199
253
|
# is documented as an array but the input is not
|
200
|
-
|
254
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
255
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
256
|
+
end
|
201
257
|
elsif !attributes[attribute_map[key]].nil?
|
202
|
-
transformed_hash[key
|
258
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
203
259
|
end
|
204
260
|
end
|
205
261
|
new(transformed_hash)
|
@@ -265,7 +321,7 @@ module Api
|
|
265
321
|
def to_hash
|
266
322
|
hash = {}
|
267
323
|
self.class.attribute_map.each_pair do |attr, param|
|
268
|
-
value = send(attr)
|
324
|
+
value = self.send(attr)
|
269
325
|
if value.nil?
|
270
326
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
271
327
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -293,5 +349,7 @@ module Api
|
|
293
349
|
value
|
294
350
|
end
|
295
351
|
end
|
352
|
+
|
296
353
|
end
|
354
|
+
|
297
355
|
end
|
@@ -1,26 +1,26 @@
|
|
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 ChargeMessageStatus
|
18
|
-
UNSPECIFIED =
|
19
|
-
SUCCESS =
|
20
|
-
FAILURE =
|
21
|
-
WAITING_EKYC =
|
22
|
-
BLOCKING =
|
23
|
-
CANCELLED =
|
18
|
+
UNSPECIFIED = "STATUS_UNSPECIFIED".freeze
|
19
|
+
SUCCESS = "STATUS_SUCCESS".freeze
|
20
|
+
FAILURE = "STATUS_FAILURE".freeze
|
21
|
+
WAITING_EKYC = "STATUS_WAITING_EKYC".freeze
|
22
|
+
BLOCKING = "STATUS_BLOCKING".freeze
|
23
|
+
CANCELLED = "STATUS_CANCELLED".freeze
|
24
24
|
|
25
25
|
def self.all_vars
|
26
26
|
@all_vars ||= [UNSPECIFIED, SUCCESS, FAILURE, WAITING_EKYC, BLOCKING, CANCELLED].freeze
|
@@ -38,7 +38,6 @@ module Api
|
|
38
38
|
# @return [String] The enum value
|
39
39
|
def build_from_hash(value)
|
40
40
|
return value if ChargeMessageStatus.all_vars.include?(value)
|
41
|
-
|
42
41
|
raise "Invalid ENUM value #{value} for class #ChargeMessageStatus"
|
43
42
|
end
|
44
43
|
end
|