jamm 1.6.0 → 1.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39fcf04f73f19b957ee852c27e89be74607772620b9645d5f5395c8c1e016f07
4
- data.tar.gz: 012cdbd996aa04e6031d659f58571447577de3fd2cccd2a67a8a863c95144e07
3
+ metadata.gz: 571cd55d4f48ad397f8b1b4a3f442bba54e87be8a021c60dc866eaf8893d2f91
4
+ data.tar.gz: 915b6f10dd15012ba4a7fa05f68c36d653c0cb74b7ae058afa357e4511d4ecdb
5
5
  SHA512:
6
- metadata.gz: e2488f0a84b311fe9a2f51419f2155ed23f2f6138ccd85b43701b019af245ff50ce0be78d804770e535434d355cdda3567ce0f3005a2570c7898997da60e6f30
7
- data.tar.gz: 9fb9ef6c1951881bcfc83284b2081928375fdc4258bdad83fcc82cc15d78aedb51ade34cd22c5b0686ce341065fe0f57e4d87a0410c585f4c24516edc7cf5d86
6
+ metadata.gz: d578007b52e84b6a725fe9935d7948dd5415ae1fbbc1b98ecab895c293efa4f513ff74b5b9a49f004ba171c2b46ac34635f0c1b99b51dbe028468713766f3103
7
+ data.tar.gz: 5be46a218ea9a5d3cd4fde2cbc7821eb017ca77131a24a58bafcffd02e359db87b627c1ea5714c7ae679a9dd12dd62d6ba8da6254d2af8ec4d58dc19ca2ccbbe
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jamm (1.6.0)
4
+ jamm (1.7.0)
5
5
  rest-client (~> 2.0)
6
6
  typhoeus (~> 1.0, >= 1.0.1)
7
7
 
@@ -22,9 +22,7 @@ GEM
22
22
  ffi (>= 1.15.0)
23
23
  faker (3.5.1)
24
24
  i18n (>= 1.8.11, < 2)
25
- ffi (1.17.0-aarch64-linux-gnu)
26
- ffi (1.17.0-arm64-darwin)
27
- ffi (1.17.0-x86_64-linux-gnu)
25
+ ffi (1.17.0)
28
26
  gimei (1.5.0)
29
27
  hashdiff (1.1.0)
30
28
  http-accept (1.7.0)
@@ -355,6 +355,142 @@ module Api
355
355
  return data, status_code, headers
356
356
  end
357
357
 
358
+ # Initiate async withdraw (internal)
359
+ # Internal-only endpoint for initiating asynchronous withdrawal processing.
360
+ # @param body [WithdrawAsyncRequest] This message represents a request to withdraw money from a customer asynchronously. It contains the customer ID and the amount to withdraw.
361
+ # @param [Hash] opts the optional parameters
362
+ # @return [WithdrawAsyncResponse]
363
+ def internal_withdraw_async(body, opts = {})
364
+ data, _status_code, _headers = internal_withdraw_async_with_http_info(body, opts)
365
+ data
366
+ end
367
+
368
+ # Initiate async withdraw (internal)
369
+ # Internal-only endpoint for initiating asynchronous withdrawal processing.
370
+ # @param body [WithdrawAsyncRequest] This message represents a request to withdraw money from a customer asynchronously. It contains the customer ID and the amount to withdraw.
371
+ # @param [Hash] opts the optional parameters
372
+ # @return [Array<(WithdrawAsyncResponse, Integer, Hash)>] WithdrawAsyncResponse data, response status code and response headers
373
+ def internal_withdraw_async_with_http_info(body, opts = {})
374
+ if @api_client.config.debugging
375
+ @api_client.config.logger.debug 'Calling API: PaymentApi.internal_withdraw_async ...'
376
+ end
377
+ # verify the required parameter 'body' is set
378
+ if @api_client.config.client_side_validation && body.nil?
379
+ fail ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.internal_withdraw_async"
380
+ end
381
+ # resource path
382
+ local_var_path = '/v1/withdraw/async'
383
+
384
+ # query parameters
385
+ query_params = opts[:query_params] || {}
386
+
387
+ # header parameters
388
+ header_params = opts[:header_params] || {}
389
+ # HTTP header 'Accept' (if needed)
390
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
391
+ # HTTP header 'Content-Type'
392
+ content_type = @api_client.select_header_content_type(['application/json'])
393
+ if !content_type.nil?
394
+ header_params['Content-Type'] = content_type
395
+ end
396
+
397
+ # form parameters
398
+ form_params = opts[:form_params] || {}
399
+
400
+ # http body (model)
401
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
402
+
403
+ # return_type
404
+ return_type = opts[:debug_return_type] || 'WithdrawAsyncResponse'
405
+
406
+ # auth_names
407
+ auth_names = opts[:debug_auth_names] || []
408
+
409
+ new_options = opts.merge(
410
+ :operation => :"PaymentApi.internal_withdraw_async",
411
+ :header_params => header_params,
412
+ :query_params => query_params,
413
+ :form_params => form_params,
414
+ :body => post_body,
415
+ :auth_names => auth_names,
416
+ :return_type => return_type
417
+ )
418
+
419
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
420
+ if @api_client.config.debugging
421
+ @api_client.config.logger.debug "API called: PaymentApi#internal_withdraw_async\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
422
+ end
423
+ return data, status_code, headers
424
+ end
425
+
426
+ # Get async withdraw status (internal)
427
+ # Internal-only endpoint for retrieving async withdraw processing status.
428
+ # @param body [WithdrawAsyncStatusRequest] This message represents a request to get the status of an asynchronous withdrawal.
429
+ # @param [Hash] opts the optional parameters
430
+ # @return [WithdrawAsyncStatusResponse]
431
+ def internal_withdraw_async_status(body, opts = {})
432
+ data, _status_code, _headers = internal_withdraw_async_status_with_http_info(body, opts)
433
+ data
434
+ end
435
+
436
+ # Get async withdraw status (internal)
437
+ # Internal-only endpoint for retrieving async withdraw processing status.
438
+ # @param body [WithdrawAsyncStatusRequest] This message represents a request to get the status of an asynchronous withdrawal.
439
+ # @param [Hash] opts the optional parameters
440
+ # @return [Array<(WithdrawAsyncStatusResponse, Integer, Hash)>] WithdrawAsyncStatusResponse data, response status code and response headers
441
+ def internal_withdraw_async_status_with_http_info(body, opts = {})
442
+ if @api_client.config.debugging
443
+ @api_client.config.logger.debug 'Calling API: PaymentApi.internal_withdraw_async_status ...'
444
+ end
445
+ # verify the required parameter 'body' is set
446
+ if @api_client.config.client_side_validation && body.nil?
447
+ fail ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.internal_withdraw_async_status"
448
+ end
449
+ # resource path
450
+ local_var_path = '/v1/withdraw/async/status'
451
+
452
+ # query parameters
453
+ query_params = opts[:query_params] || {}
454
+
455
+ # header parameters
456
+ header_params = opts[:header_params] || {}
457
+ # HTTP header 'Accept' (if needed)
458
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
459
+ # HTTP header 'Content-Type'
460
+ content_type = @api_client.select_header_content_type(['application/json'])
461
+ if !content_type.nil?
462
+ header_params['Content-Type'] = content_type
463
+ end
464
+
465
+ # form parameters
466
+ form_params = opts[:form_params] || {}
467
+
468
+ # http body (model)
469
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
470
+
471
+ # return_type
472
+ return_type = opts[:debug_return_type] || 'WithdrawAsyncStatusResponse'
473
+
474
+ # auth_names
475
+ auth_names = opts[:debug_auth_names] || []
476
+
477
+ new_options = opts.merge(
478
+ :operation => :"PaymentApi.internal_withdraw_async_status",
479
+ :header_params => header_params,
480
+ :query_params => query_params,
481
+ :form_params => form_params,
482
+ :body => post_body,
483
+ :auth_names => auth_names,
484
+ :return_type => return_type
485
+ )
486
+
487
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
488
+ if @api_client.config.debugging
489
+ @api_client.config.logger.debug "API called: PaymentApi#internal_withdraw_async_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
490
+ end
491
+ return data, status_code, headers
492
+ end
493
+
358
494
  # Process payment directly without redirect
359
495
  # Execute a payment off-session within your application without redirecting to a payment page.
360
496
  # @param body [OffSessionPaymentRequest] This message represents a request to process a payment directly within the application. It contains the customer ID and charge details to be processed.
@@ -0,0 +1,44 @@
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
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Api
17
+ class AsyncStatus
18
+ UNSPECIFIED = "ASYNC_STATUS_UNSPECIFIED".freeze
19
+ PENDING = "ASYNC_STATUS_PENDING".freeze
20
+ RUNNING = "ASYNC_STATUS_RUNNING".freeze
21
+ SUCCEEDED = "ASYNC_STATUS_SUCCEEDED".freeze
22
+ FAILED_TO_START = "ASYNC_STATUS_FAILED_TO_START".freeze
23
+ FAILED = "ASYNC_STATUS_FAILED".freeze
24
+
25
+ def self.all_vars
26
+ @all_vars ||= [UNSPECIFIED, PENDING, RUNNING, SUCCEEDED, FAILED_TO_START, FAILED].freeze
27
+ end
28
+
29
+ # Builds the enum from string
30
+ # @param [String] The enum value in the form of the string
31
+ # @return [String] The enum value
32
+ def self.build_from_hash(value)
33
+ new.build_from_hash(value)
34
+ end
35
+
36
+ # Builds the enum from string
37
+ # @param [String] The enum value in the form of the string
38
+ # @return [String] The enum value
39
+ def build_from_hash(value)
40
+ return value if AsyncStatus.all_vars.include?(value)
41
+ raise "Invalid ENUM value #{value} for class #AsyncStatus"
42
+ end
43
+ end
44
+ end
@@ -35,9 +35,24 @@ module Api
35
35
  PAYMENT_CHARGE_SUBSCRIPTION_EXPIRED = "ERROR_TYPE_PAYMENT_CHARGE_SUBSCRIPTION_EXPIRED".freeze
36
36
  PAYMENT_LINK_EXPIRED = "ERROR_TYPE_PAYMENT_LINK_EXPIRED".freeze
37
37
  PAYMENT_CHARGE_INSUFFICIENT_FUNDS = "ERROR_TYPE_PAYMENT_CHARGE_INSUFFICIENT_FUNDS".freeze
38
+ CSV_VALIDATION_FAILED = "ERROR_TYPE_CSV_VALIDATION_FAILED".freeze
39
+ CSV_TOTP_REQUIRED = "ERROR_TYPE_CSV_TOTP_REQUIRED".freeze
40
+ CSV_TOTP_INVALID = "ERROR_TYPE_CSV_TOTP_INVALID".freeze
41
+ CSV_TOTP_EXPIRED = "ERROR_TYPE_CSV_TOTP_EXPIRED".freeze
42
+ CSV_TOTP_LOCKED = "ERROR_TYPE_CSV_TOTP_LOCKED".freeze
43
+ CSV_BATCH_TOO_LARGE = "ERROR_TYPE_CSV_BATCH_TOO_LARGE".freeze
44
+ CSV_CUSTOMER_NOT_FOUND = "ERROR_TYPE_CSV_CUSTOMER_NOT_FOUND".freeze
45
+ CSV_PROCESSING_FAILED = "ERROR_TYPE_CSV_PROCESSING_FAILED".freeze
46
+ CSV_CHALLENGE_NOT_FOUND = "ERROR_TYPE_CSV_CHALLENGE_NOT_FOUND".freeze
47
+ CSV_DUPLICATE_USER = "ERROR_TYPE_CSV_DUPLICATE_USER".freeze
48
+ TOTP_SETUP_FAILED = "ERROR_TYPE_TOTP_SETUP_FAILED".freeze
49
+ TOTP_ALREADY_ENABLED = "ERROR_TYPE_TOTP_ALREADY_ENABLED".freeze
50
+ TOTP_NOT_ENABLED = "ERROR_TYPE_TOTP_NOT_ENABLED".freeze
51
+ TOTP_SETUP_INVALID = "ERROR_TYPE_TOTP_SETUP_INVALID".freeze
52
+ TOTP_DISABLE_FAILED = "ERROR_TYPE_TOTP_DISABLE_FAILED".freeze
38
53
 
39
54
  def self.all_vars
40
- @all_vars ||= [UNSPECIFIED, AUTH_FAILED, AUTH_REJECTED, ACCOUNT_CREATION_FAILED, ACCOUNT_MODIFICATION_FAILED, ACCOUNT_DELETION_FAILED, ACCOUNT_BANK_REGISTRATION_FAILED, KYC_REJECTED, NOTIFICATION_WEBHOOK_FAILED, NOTIFICATION_EMAIL_FAILED, NOTIFICATION_SMS_FAILED, PAYMENT_GATEWAY_UNAVAILABLE, PAYMENT_GATEWAY_FAILED, PAYMENT_VALIDATION_FAILED, PAYMENT_CHARGE_FAILED, PAYMENT_CHARGE_REJECTED, PAYMENT_CHARGE_OVER_LIMIT, PAYMENT_CHARGE_SUBSCRIPTION_EXPIRED, PAYMENT_LINK_EXPIRED, PAYMENT_CHARGE_INSUFFICIENT_FUNDS].freeze
55
+ @all_vars ||= [UNSPECIFIED, AUTH_FAILED, AUTH_REJECTED, ACCOUNT_CREATION_FAILED, ACCOUNT_MODIFICATION_FAILED, ACCOUNT_DELETION_FAILED, ACCOUNT_BANK_REGISTRATION_FAILED, KYC_REJECTED, NOTIFICATION_WEBHOOK_FAILED, NOTIFICATION_EMAIL_FAILED, NOTIFICATION_SMS_FAILED, PAYMENT_GATEWAY_UNAVAILABLE, PAYMENT_GATEWAY_FAILED, PAYMENT_VALIDATION_FAILED, PAYMENT_CHARGE_FAILED, PAYMENT_CHARGE_REJECTED, PAYMENT_CHARGE_OVER_LIMIT, PAYMENT_CHARGE_SUBSCRIPTION_EXPIRED, PAYMENT_LINK_EXPIRED, PAYMENT_CHARGE_INSUFFICIENT_FUNDS, CSV_VALIDATION_FAILED, CSV_TOTP_REQUIRED, CSV_TOTP_INVALID, CSV_TOTP_EXPIRED, CSV_TOTP_LOCKED, CSV_BATCH_TOO_LARGE, CSV_CUSTOMER_NOT_FOUND, CSV_PROCESSING_FAILED, CSV_CHALLENGE_NOT_FOUND, CSV_DUPLICATE_USER, TOTP_SETUP_FAILED, TOTP_ALREADY_ENABLED, TOTP_NOT_ENABLED, TOTP_SETUP_INVALID, TOTP_DISABLE_FAILED].freeze
41
56
  end
42
57
 
43
58
  # Builds the enum from string
@@ -23,13 +23,16 @@ module Api
23
23
 
24
24
  attr_accessor :payment_link
25
25
 
26
+ attr_accessor :one_time
27
+
26
28
  # Attribute mapping from ruby-style variable name to JSON key.
27
29
  def self.attribute_map
28
30
  {
29
31
  :'contract' => :'contract',
30
32
  :'charge' => :'charge',
31
33
  :'customer' => :'customer',
32
- :'payment_link' => :'paymentLink'
34
+ :'payment_link' => :'paymentLink',
35
+ :'one_time' => :'oneTime'
33
36
  }
34
37
  end
35
38
 
@@ -44,7 +47,8 @@ module Api
44
47
  :'contract' => :'Contract',
45
48
  :'charge' => :'Charge',
46
49
  :'customer' => :'Customer',
47
- :'payment_link' => :'PaymentLink'
50
+ :'payment_link' => :'PaymentLink',
51
+ :'one_time' => :'Boolean'
48
52
  }
49
53
  end
50
54
 
@@ -84,6 +88,10 @@ module Api
84
88
  if attributes.key?(:'payment_link')
85
89
  self.payment_link = attributes[:'payment_link']
86
90
  end
91
+
92
+ if attributes.key?(:'one_time')
93
+ self.one_time = attributes[:'one_time']
94
+ end
87
95
  end
88
96
 
89
97
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -109,7 +117,8 @@ module Api
109
117
  contract == o.contract &&
110
118
  charge == o.charge &&
111
119
  customer == o.customer &&
112
- payment_link == o.payment_link
120
+ payment_link == o.payment_link &&
121
+ one_time == o.one_time
113
122
  end
114
123
 
115
124
  # @see the `==` method
@@ -121,7 +130,7 @@ module Api
121
130
  # Calculates hash code according to all attributes.
122
131
  # @return [Integer] Hash code
123
132
  def hash
124
- [contract, charge, customer, payment_link].hash
133
+ [contract, charge, customer, payment_link, one_time].hash
125
134
  end
126
135
 
127
136
  # Builds the object from hash
@@ -25,9 +25,10 @@ module Api
25
25
  VALIDATION_FAILED = "ON_SESSION_PAYMENT_ERROR_CODE_VALIDATION_FAILED".freeze
26
26
  STRATEGY_EXECUTION_FAILED = "ON_SESSION_PAYMENT_ERROR_CODE_STRATEGY_EXECUTION_FAILED".freeze
27
27
  INVALID_PAYMENT_STRATEGY = "ON_SESSION_PAYMENT_ERROR_CODE_INVALID_PAYMENT_STRATEGY".freeze
28
+ INTERNAL_ERROR = "ON_SESSION_PAYMENT_ERROR_CODE_INTERNAL_ERROR".freeze
28
29
 
29
30
  def self.all_vars
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
31
+ @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, INTERNAL_ERROR].freeze
31
32
  end
32
33
 
33
34
  # Builds the enum from string
@@ -22,6 +22,9 @@ module Api
22
22
 
23
23
  attr_accessor :charge
24
24
 
25
+ # Defaults to false if not provided. If true, the charge is processed as a one-time payment and no contract is created. If provided without a customer ID, the system will create a new customer. Requires charge to be present. 未指定の場合はfalseがデフォルトです。 trueの場合、決済は一回限りの支払いとして処理され、契約は作成されません。 customer IDが提供されていない場合、新規顧客が作成されます。 chargeが必須です。
26
+ attr_accessor :one_time
27
+
25
28
  attr_accessor :redirect
26
29
 
27
30
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -30,6 +33,7 @@ module Api
30
33
  :'customer' => :'customer',
31
34
  :'buyer' => :'buyer',
32
35
  :'charge' => :'charge',
36
+ :'one_time' => :'oneTime',
33
37
  :'redirect' => :'redirect'
34
38
  }
35
39
  end
@@ -45,6 +49,7 @@ module Api
45
49
  :'customer' => :'String',
46
50
  :'buyer' => :'Buyer',
47
51
  :'charge' => :'InitialCharge',
52
+ :'one_time' => :'Boolean',
48
53
  :'redirect' => :'URL'
49
54
  }
50
55
  end
@@ -82,6 +87,10 @@ module Api
82
87
  self.charge = attributes[:'charge']
83
88
  end
84
89
 
90
+ if attributes.key?(:'one_time')
91
+ self.one_time = attributes[:'one_time']
92
+ end
93
+
85
94
  if attributes.key?(:'redirect')
86
95
  self.redirect = attributes[:'redirect']
87
96
  end
@@ -110,6 +119,7 @@ module Api
110
119
  customer == o.customer &&
111
120
  buyer == o.buyer &&
112
121
  charge == o.charge &&
122
+ one_time == o.one_time &&
113
123
  redirect == o.redirect
114
124
  end
115
125
 
@@ -122,7 +132,7 @@ module Api
122
132
  # Calculates hash code according to all attributes.
123
133
  # @return [Integer] Hash code
124
134
  def hash
125
- [customer, buyer, charge, redirect].hash
135
+ [customer, buyer, charge, one_time, redirect].hash
126
136
  end
127
137
 
128
138
  # Builds the object from hash
@@ -14,19 +14,17 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Api
17
- class GetMajorBanksResponse
18
- attr_accessor :mizuho
17
+ # This message represents a request to withdraw money from a customer asynchronously. It contains the customer ID and the amount to withdraw.
18
+ class WithdrawAsyncRequest
19
+ attr_accessor :customer
19
20
 
20
- attr_accessor :mufg
21
-
22
- attr_accessor :smbc
21
+ attr_accessor :charge
23
22
 
24
23
  # Attribute mapping from ruby-style variable name to JSON key.
25
24
  def self.attribute_map
26
25
  {
27
- :'mizuho' => :'mizuho',
28
- :'mufg' => :'mufg',
29
- :'smbc' => :'smbc'
26
+ :'customer' => :'customer',
27
+ :'charge' => :'charge'
30
28
  }
31
29
  end
32
30
 
@@ -38,9 +36,8 @@ module Api
38
36
  # Attribute type mapping.
39
37
  def self.openapi_types
40
38
  {
41
- :'mizuho' => :'Bank',
42
- :'mufg' => :'Bank',
43
- :'smbc' => :'Bank'
39
+ :'customer' => :'String',
40
+ :'charge' => :'InitialCharge'
44
41
  }
45
42
  end
46
43
 
@@ -54,27 +51,23 @@ module Api
54
51
  # @param [Hash] attributes Model attributes in the form of hash
55
52
  def initialize(attributes = {})
56
53
  if (!attributes.is_a?(Hash))
57
- fail ArgumentError, "The input argument (attributes) must be a hash in `Api::GetMajorBanksResponse` initialize method"
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::WithdrawAsyncRequest` initialize method"
58
55
  end
59
56
 
60
57
  # check to see if the attribute exists and convert string to symbol for hash key
61
58
  attributes = attributes.each_with_object({}) { |(k, v), h|
62
59
  if (!self.class.attribute_map.key?(k.to_sym))
63
- fail ArgumentError, "`#{k}` is not a valid attribute in `Api::GetMajorBanksResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::WithdrawAsyncRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
61
  end
65
62
  h[k.to_sym] = v
66
63
  }
67
64
 
68
- if attributes.key?(:'mizuho')
69
- self.mizuho = attributes[:'mizuho']
70
- end
71
-
72
- if attributes.key?(:'mufg')
73
- self.mufg = attributes[:'mufg']
65
+ if attributes.key?(:'customer')
66
+ self.customer = attributes[:'customer']
74
67
  end
75
68
 
76
- if attributes.key?(:'smbc')
77
- self.smbc = attributes[:'smbc']
69
+ if attributes.key?(:'charge')
70
+ self.charge = attributes[:'charge']
78
71
  end
79
72
  end
80
73
 
@@ -98,9 +91,8 @@ module Api
98
91
  def ==(o)
99
92
  return true if self.equal?(o)
100
93
  self.class == o.class &&
101
- mizuho == o.mizuho &&
102
- mufg == o.mufg &&
103
- smbc == o.smbc
94
+ customer == o.customer &&
95
+ charge == o.charge
104
96
  end
105
97
 
106
98
  # @see the `==` method
@@ -112,7 +104,7 @@ module Api
112
104
  # Calculates hash code according to all attributes.
113
105
  # @return [Integer] Hash code
114
106
  def hash
115
- [mizuho, mufg, smbc].hash
107
+ [customer, charge].hash
116
108
  end
117
109
 
118
110
  # Builds the object from hash
@@ -0,0 +1,248 @@
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
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Api
17
+ # This message represents the asynchronous response after initiating a withdrawal.
18
+ class WithdrawAsyncResponse
19
+ attr_accessor :request_id
20
+
21
+ attr_accessor :status
22
+
23
+ class EnumAttributeValidator
24
+ attr_reader :datatype
25
+ attr_reader :allowable_values
26
+
27
+ def initialize(datatype, allowable_values)
28
+ @allowable_values = allowable_values.map do |value|
29
+ case datatype.to_s
30
+ when /Integer/i
31
+ value.to_i
32
+ when /Float/i
33
+ value.to_f
34
+ else
35
+ value
36
+ end
37
+ end
38
+ end
39
+
40
+ def valid?(value)
41
+ !value || allowable_values.include?(value)
42
+ end
43
+ end
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'request_id' => :'requestId',
49
+ :'status' => :'status'
50
+ }
51
+ end
52
+
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ attribute_map.values
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ :'request_id' => :'String',
62
+ :'status' => :'AsyncStatus'
63
+ }
64
+ end
65
+
66
+ # List of attributes with nullable: true
67
+ def self.openapi_nullable
68
+ Set.new([
69
+ ])
70
+ end
71
+
72
+ # Initializes the object
73
+ # @param [Hash] attributes Model attributes in the form of hash
74
+ def initialize(attributes = {})
75
+ if (!attributes.is_a?(Hash))
76
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::WithdrawAsyncResponse` initialize method"
77
+ end
78
+
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!self.class.attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::WithdrawAsyncResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'request_id')
88
+ self.request_id = attributes[:'request_id']
89
+ end
90
+
91
+ if attributes.key?(:'status')
92
+ self.status = attributes[:'status']
93
+ else
94
+ self.status = 'ASYNC_STATUS_UNSPECIFIED'
95
+ end
96
+ end
97
+
98
+ # Show invalid properties with the reasons. Usually used together with valid?
99
+ # @return Array for valid properties with the reasons
100
+ def list_invalid_properties
101
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
102
+ invalid_properties = Array.new
103
+ invalid_properties
104
+ end
105
+
106
+ # Check to see if the all the properties in the model are valid
107
+ # @return true if the model is valid
108
+ def valid?
109
+ warn '[DEPRECATED] the `valid?` method is obsolete'
110
+ true
111
+ end
112
+
113
+ # Checks equality by comparing each attribute.
114
+ # @param [Object] Object to be compared
115
+ def ==(o)
116
+ return true if self.equal?(o)
117
+ self.class == o.class &&
118
+ request_id == o.request_id &&
119
+ status == o.status
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Integer] Hash code
130
+ def hash
131
+ [request_id, status].hash
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def self.build_from_hash(attributes)
138
+ return nil unless attributes.is_a?(Hash)
139
+ attributes = attributes.transform_keys(&:to_sym)
140
+ transformed_hash = {}
141
+ openapi_types.each_pair do |key, type|
142
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = nil
144
+ elsif type =~ /\AArray<(.*)>/i
145
+ # check to ensure the input is an array given that the attribute
146
+ # is documented as an array but the input is not
147
+ if attributes[attribute_map[key]].is_a?(Array)
148
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
149
+ end
150
+ elsif !attributes[attribute_map[key]].nil?
151
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
152
+ end
153
+ end
154
+ new(transformed_hash)
155
+ end
156
+
157
+ # Deserializes the data based on type
158
+ # @param string type Data type
159
+ # @param string value Value to be deserialized
160
+ # @return [Object] Deserialized data
161
+ def self._deserialize(type, value)
162
+ case type.to_sym
163
+ when :Time
164
+ Time.parse(value)
165
+ when :Date
166
+ Date.parse(value)
167
+ when :String
168
+ value.to_s
169
+ when :Integer
170
+ value.to_i
171
+ when :Float
172
+ value.to_f
173
+ when :Boolean
174
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
175
+ true
176
+ else
177
+ false
178
+ end
179
+ when :Object
180
+ # generic object (usually a Hash), return directly
181
+ value
182
+ when /\AArray<(?<inner_type>.+)>\z/
183
+ inner_type = Regexp.last_match[:inner_type]
184
+ value.map { |v| _deserialize(inner_type, v) }
185
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
186
+ k_type = Regexp.last_match[:k_type]
187
+ v_type = Regexp.last_match[:v_type]
188
+ {}.tap do |hash|
189
+ value.each do |k, v|
190
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
191
+ end
192
+ end
193
+ else # model
194
+ # models (e.g. Pet) or oneOf
195
+ klass = Api.const_get(type)
196
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
197
+ end
198
+ end
199
+
200
+ # Returns the string representation of the object
201
+ # @return [String] String presentation of the object
202
+ def to_s
203
+ to_hash.to_s
204
+ end
205
+
206
+ # to_body is an alias to to_hash (backward compatibility)
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_body
209
+ to_hash
210
+ end
211
+
212
+ # Returns the object in the form of hash
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_hash
215
+ hash = {}
216
+ self.class.attribute_map.each_pair do |attr, param|
217
+ value = self.send(attr)
218
+ if value.nil?
219
+ is_nullable = self.class.openapi_nullable.include?(attr)
220
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
221
+ end
222
+
223
+ hash[param] = _to_hash(value)
224
+ end
225
+ hash
226
+ end
227
+
228
+ # Outputs non-array value in the form of hash
229
+ # For object, use to_hash. Otherwise, just return the value
230
+ # @param [Object] value Any valid value
231
+ # @return [Hash] Returns the value in the form of hash
232
+ def _to_hash(value)
233
+ if value.is_a?(Array)
234
+ value.compact.map { |v| _to_hash(v) }
235
+ elsif value.is_a?(Hash)
236
+ {}.tap do |hash|
237
+ value.each { |k, v| hash[k] = _to_hash(v) }
238
+ end
239
+ elsif value.respond_to? :to_hash
240
+ value.to_hash
241
+ else
242
+ value
243
+ end
244
+ end
245
+
246
+ end
247
+
248
+ end
@@ -0,0 +1,215 @@
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
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Api
17
+ # This message represents a request to get the status of an asynchronous withdrawal.
18
+ class WithdrawAsyncStatusRequest
19
+ attr_accessor :request_id
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'request_id' => :'requestId'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'request_id' => :'String'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::WithdrawAsyncStatusRequest` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::WithdrawAsyncStatusRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'request_id')
62
+ self.request_id = attributes[:'request_id']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
70
+ invalid_properties = Array.new
71
+ invalid_properties
72
+ end
73
+
74
+ # Check to see if the all the properties in the model are valid
75
+ # @return true if the model is valid
76
+ def valid?
77
+ warn '[DEPRECATED] the `valid?` method is obsolete'
78
+ true
79
+ end
80
+
81
+ # Checks equality by comparing each attribute.
82
+ # @param [Object] Object to be compared
83
+ def ==(o)
84
+ return true if self.equal?(o)
85
+ self.class == o.class &&
86
+ request_id == o.request_id
87
+ end
88
+
89
+ # @see the `==` method
90
+ # @param [Object] Object to be compared
91
+ def eql?(o)
92
+ self == o
93
+ end
94
+
95
+ # Calculates hash code according to all attributes.
96
+ # @return [Integer] Hash code
97
+ def hash
98
+ [request_id].hash
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def self.build_from_hash(attributes)
105
+ return nil unless attributes.is_a?(Hash)
106
+ attributes = attributes.transform_keys(&:to_sym)
107
+ transformed_hash = {}
108
+ openapi_types.each_pair do |key, type|
109
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
110
+ transformed_hash["#{key}"] = nil
111
+ elsif type =~ /\AArray<(.*)>/i
112
+ # check to ensure the input is an array given that the attribute
113
+ # is documented as an array but the input is not
114
+ if attributes[attribute_map[key]].is_a?(Array)
115
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
116
+ end
117
+ elsif !attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
119
+ end
120
+ end
121
+ new(transformed_hash)
122
+ end
123
+
124
+ # Deserializes the data based on type
125
+ # @param string type Data type
126
+ # @param string value Value to be deserialized
127
+ # @return [Object] Deserialized data
128
+ def self._deserialize(type, value)
129
+ case type.to_sym
130
+ when :Time
131
+ Time.parse(value)
132
+ when :Date
133
+ Date.parse(value)
134
+ when :String
135
+ value.to_s
136
+ when :Integer
137
+ value.to_i
138
+ when :Float
139
+ value.to_f
140
+ when :Boolean
141
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
142
+ true
143
+ else
144
+ false
145
+ end
146
+ when :Object
147
+ # generic object (usually a Hash), return directly
148
+ value
149
+ when /\AArray<(?<inner_type>.+)>\z/
150
+ inner_type = Regexp.last_match[:inner_type]
151
+ value.map { |v| _deserialize(inner_type, v) }
152
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
153
+ k_type = Regexp.last_match[:k_type]
154
+ v_type = Regexp.last_match[:v_type]
155
+ {}.tap do |hash|
156
+ value.each do |k, v|
157
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
158
+ end
159
+ end
160
+ else # model
161
+ # models (e.g. Pet) or oneOf
162
+ klass = Api.const_get(type)
163
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
164
+ end
165
+ end
166
+
167
+ # Returns the string representation of the object
168
+ # @return [String] String presentation of the object
169
+ def to_s
170
+ to_hash.to_s
171
+ end
172
+
173
+ # to_body is an alias to to_hash (backward compatibility)
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_body
176
+ to_hash
177
+ end
178
+
179
+ # Returns the object in the form of hash
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_hash
182
+ hash = {}
183
+ self.class.attribute_map.each_pair do |attr, param|
184
+ value = self.send(attr)
185
+ if value.nil?
186
+ is_nullable = self.class.openapi_nullable.include?(attr)
187
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
188
+ end
189
+
190
+ hash[param] = _to_hash(value)
191
+ end
192
+ hash
193
+ end
194
+
195
+ # Outputs non-array value in the form of hash
196
+ # For object, use to_hash. Otherwise, just return the value
197
+ # @param [Object] value Any valid value
198
+ # @return [Hash] Returns the value in the form of hash
199
+ def _to_hash(value)
200
+ if value.is_a?(Array)
201
+ value.compact.map { |v| _to_hash(v) }
202
+ elsif value.is_a?(Hash)
203
+ {}.tap do |hash|
204
+ value.each { |k, v| hash[k] = _to_hash(v) }
205
+ end
206
+ elsif value.respond_to? :to_hash
207
+ value.to_hash
208
+ else
209
+ value
210
+ end
211
+ end
212
+
213
+ end
214
+
215
+ end
@@ -0,0 +1,257 @@
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
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Api
17
+ # This message represents the response containing the status of an asynchronous withdrawal.
18
+ class WithdrawAsyncStatusResponse
19
+ attr_accessor :status
20
+
21
+ attr_accessor :customer
22
+
23
+ attr_accessor :charge
24
+
25
+ class EnumAttributeValidator
26
+ attr_reader :datatype
27
+ attr_reader :allowable_values
28
+
29
+ def initialize(datatype, allowable_values)
30
+ @allowable_values = allowable_values.map do |value|
31
+ case datatype.to_s
32
+ when /Integer/i
33
+ value.to_i
34
+ when /Float/i
35
+ value.to_f
36
+ else
37
+ value
38
+ end
39
+ end
40
+ end
41
+
42
+ def valid?(value)
43
+ !value || allowable_values.include?(value)
44
+ end
45
+ end
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'status' => :'status',
51
+ :'customer' => :'customer',
52
+ :'charge' => :'charge'
53
+ }
54
+ end
55
+
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ attribute_map.values
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ def self.openapi_types
63
+ {
64
+ :'status' => :'AsyncStatus',
65
+ :'customer' => :'Customer',
66
+ :'charge' => :'ChargeResult'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Api::WithdrawAsyncStatusResponse` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!self.class.attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Api::WithdrawAsyncStatusResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'status')
92
+ self.status = attributes[:'status']
93
+ else
94
+ self.status = 'ASYNC_STATUS_UNSPECIFIED'
95
+ end
96
+
97
+ if attributes.key?(:'customer')
98
+ self.customer = attributes[:'customer']
99
+ end
100
+
101
+ if attributes.key?(:'charge')
102
+ self.charge = attributes[:'charge']
103
+ end
104
+ end
105
+
106
+ # Show invalid properties with the reasons. Usually used together with valid?
107
+ # @return Array for valid properties with the reasons
108
+ def list_invalid_properties
109
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
110
+ invalid_properties = Array.new
111
+ invalid_properties
112
+ end
113
+
114
+ # Check to see if the all the properties in the model are valid
115
+ # @return true if the model is valid
116
+ def valid?
117
+ warn '[DEPRECATED] the `valid?` method is obsolete'
118
+ true
119
+ end
120
+
121
+ # Checks equality by comparing each attribute.
122
+ # @param [Object] Object to be compared
123
+ def ==(o)
124
+ return true if self.equal?(o)
125
+ self.class == o.class &&
126
+ status == o.status &&
127
+ customer == o.customer &&
128
+ charge == o.charge
129
+ end
130
+
131
+ # @see the `==` method
132
+ # @param [Object] Object to be compared
133
+ def eql?(o)
134
+ self == o
135
+ end
136
+
137
+ # Calculates hash code according to all attributes.
138
+ # @return [Integer] Hash code
139
+ def hash
140
+ [status, customer, charge].hash
141
+ end
142
+
143
+ # Builds the object from hash
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ # @return [Object] Returns the model itself
146
+ def self.build_from_hash(attributes)
147
+ return nil unless attributes.is_a?(Hash)
148
+ attributes = attributes.transform_keys(&:to_sym)
149
+ transformed_hash = {}
150
+ openapi_types.each_pair do |key, type|
151
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
152
+ transformed_hash["#{key}"] = nil
153
+ elsif type =~ /\AArray<(.*)>/i
154
+ # check to ensure the input is an array given that the attribute
155
+ # is documented as an array but the input is not
156
+ if attributes[attribute_map[key]].is_a?(Array)
157
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
158
+ end
159
+ elsif !attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
161
+ end
162
+ end
163
+ new(transformed_hash)
164
+ end
165
+
166
+ # Deserializes the data based on type
167
+ # @param string type Data type
168
+ # @param string value Value to be deserialized
169
+ # @return [Object] Deserialized data
170
+ def self._deserialize(type, value)
171
+ case type.to_sym
172
+ when :Time
173
+ Time.parse(value)
174
+ when :Date
175
+ Date.parse(value)
176
+ when :String
177
+ value.to_s
178
+ when :Integer
179
+ value.to_i
180
+ when :Float
181
+ value.to_f
182
+ when :Boolean
183
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
184
+ true
185
+ else
186
+ false
187
+ end
188
+ when :Object
189
+ # generic object (usually a Hash), return directly
190
+ value
191
+ when /\AArray<(?<inner_type>.+)>\z/
192
+ inner_type = Regexp.last_match[:inner_type]
193
+ value.map { |v| _deserialize(inner_type, v) }
194
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
195
+ k_type = Regexp.last_match[:k_type]
196
+ v_type = Regexp.last_match[:v_type]
197
+ {}.tap do |hash|
198
+ value.each do |k, v|
199
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
200
+ end
201
+ end
202
+ else # model
203
+ # models (e.g. Pet) or oneOf
204
+ klass = Api.const_get(type)
205
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
206
+ end
207
+ end
208
+
209
+ # Returns the string representation of the object
210
+ # @return [String] String presentation of the object
211
+ def to_s
212
+ to_hash.to_s
213
+ end
214
+
215
+ # to_body is an alias to to_hash (backward compatibility)
216
+ # @return [Hash] Returns the object in the form of hash
217
+ def to_body
218
+ to_hash
219
+ end
220
+
221
+ # Returns the object in the form of hash
222
+ # @return [Hash] Returns the object in the form of hash
223
+ def to_hash
224
+ hash = {}
225
+ self.class.attribute_map.each_pair do |attr, param|
226
+ value = self.send(attr)
227
+ if value.nil?
228
+ is_nullable = self.class.openapi_nullable.include?(attr)
229
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
230
+ end
231
+
232
+ hash[param] = _to_hash(value)
233
+ end
234
+ hash
235
+ end
236
+
237
+ # Outputs non-array value in the form of hash
238
+ # For object, use to_hash. Otherwise, just return the value
239
+ # @param [Object] value Any valid value
240
+ # @return [Hash] Returns the value in the form of hash
241
+ def _to_hash(value)
242
+ if value.is_a?(Array)
243
+ value.compact.map { |v| _to_hash(v) }
244
+ elsif value.is_a?(Hash)
245
+ {}.tap do |hash|
246
+ value.each { |k, v| hash[k] = _to_hash(v) }
247
+ end
248
+ elsif value.respond_to? :to_hash
249
+ value.to_hash
250
+ else
251
+ value
252
+ end
253
+ end
254
+
255
+ end
256
+
257
+ end
data/lib/jamm/api.rb CHANGED
@@ -24,6 +24,7 @@ require 'jamm/api/models/googlerpc_status'
24
24
  require 'jamm/api/models/protobuf_any'
25
25
  require 'jamm/api/models/v1_add_charge_request'
26
26
  require 'jamm/api/models/v1_add_charge_response'
27
+ require 'jamm/api/models/v1_async_status'
27
28
  require 'jamm/api/models/v1_bank'
28
29
  require 'jamm/api/models/v1_bank_assets'
29
30
  require 'jamm/api/models/v1_bank_branch'
@@ -58,7 +59,6 @@ require 'jamm/api/models/v1_get_charge_response'
58
59
  require 'jamm/api/models/v1_get_charges_response'
59
60
  require 'jamm/api/models/v1_get_contract_response'
60
61
  require 'jamm/api/models/v1_get_customer_response'
61
- require 'jamm/api/models/v1_get_major_banks_response'
62
62
  require 'jamm/api/models/v1_initial_charge'
63
63
  require 'jamm/api/models/v1_kyc_status'
64
64
  require 'jamm/api/models/v1_merchant'
@@ -81,6 +81,10 @@ require 'jamm/api/models/v1_search_branches_response'
81
81
  require 'jamm/api/models/v1_url'
82
82
  require 'jamm/api/models/v1_update_customer_response'
83
83
  require 'jamm/api/models/v1_user_account_message'
84
+ require 'jamm/api/models/v1_withdraw_async_request'
85
+ require 'jamm/api/models/v1_withdraw_async_response'
86
+ require 'jamm/api/models/v1_withdraw_async_status_request'
87
+ require 'jamm/api/models/v1_withdraw_async_status_response'
84
88
  require 'jamm/api/models/v1_withdraw_request'
85
89
  require 'jamm/api/models/v1_withdraw_response'
86
90
 
data/lib/jamm/payment.rb CHANGED
@@ -7,18 +7,20 @@ require 'jamm/errors'
7
7
 
8
8
  module Jamm
9
9
  module Payment
10
- def self.on_session(charge:, redirect: nil, customer: nil, buyer: nil)
10
+ def self.on_session(charge: nil, redirect: nil, customer: nil, buyer: nil, one_time: false)
11
11
  request = if customer.nil?
12
12
  Jamm::OpenAPI::OnSessionPaymentRequest.new(
13
13
  buyer: buyer,
14
14
  charge: charge,
15
- redirect: redirect
15
+ redirect: redirect,
16
+ one_time: one_time
16
17
  )
17
18
  else
18
19
  Jamm::OpenAPI::OnSessionPaymentRequest.new(
19
20
  customer: customer,
20
21
  charge: charge,
21
- redirect: redirect
22
+ redirect: redirect,
23
+ one_time: one_time
22
24
  )
23
25
  end
24
26
 
data/lib/jamm/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Jamm
4
- VERSION = '1.6.0'
4
+ VERSION = '1.7.0'
5
5
  end
data/lib/jamm.rb CHANGED
@@ -25,6 +25,7 @@ require 'jamm/api_patches'
25
25
  # Jamm Ruby SDK
26
26
  module Jamm
27
27
  # Configurable attributes.
28
+ @environment = nil
28
29
  @oauth_base = nil
29
30
  @openapi = nil
30
31
  @open_timeout = 30
@@ -32,7 +33,7 @@ module Jamm
32
33
  @max_retry = 0
33
34
 
34
35
  class << self
35
- attr_accessor :api, :client_id, :client_secret, :api_base, :env, :oauth_base, :api_version, :connect_base,
36
+ attr_accessor :api, :client_id, :client_secret, :api_base, :environment, :oauth_base, :api_version, :connect_base,
36
37
  :openapi, :open_timeout, :read_timeout, :max_retry, :retry_initial_delay, :retry_max_delay
37
38
  end
38
39
 
@@ -44,12 +45,14 @@ module Jamm
44
45
  when 'prd', 'prod', 'production'
45
46
  self.oauth_base = 'https://merchant-identity.jamm-pay.jp'
46
47
 
48
+ self.environment = 'production'
47
49
  self.openapi = Jamm::OpenAPI::ApiClient.new
48
50
  openapi.config.host = 'api.jamm-pay.jp'
49
51
 
50
52
  when 'local'
51
53
  self.oauth_base = 'https://merchant-identity.develop.jamm-pay.jp'
52
54
 
55
+ self.environment = 'local'
53
56
  self.openapi = Jamm::OpenAPI::ApiClient.new
54
57
  openapi.config.host = 'api.jamm.test'
55
58
  openapi.config.verify_ssl = false
@@ -57,6 +60,7 @@ module Jamm
57
60
  else
58
61
  self.oauth_base = "https://merchant-identity.#{env}.jamm-pay.jp"
59
62
 
63
+ self.environment = env
60
64
  self.openapi = Jamm::OpenAPI::ApiClient.new
61
65
  openapi.config.host = "api.#{env}.jamm-pay.jp"
62
66
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jamm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-11-11 00:00:00.000000000 Z
11
+ date: 2026-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -74,6 +74,7 @@ files:
74
74
  - lib/jamm/api/models/protobuf_any.rb
75
75
  - lib/jamm/api/models/v1_add_charge_request.rb
76
76
  - lib/jamm/api/models/v1_add_charge_response.rb
77
+ - lib/jamm/api/models/v1_async_status.rb
77
78
  - lib/jamm/api/models/v1_bank.rb
78
79
  - lib/jamm/api/models/v1_bank_assets.rb
79
80
  - lib/jamm/api/models/v1_bank_branch.rb
@@ -108,7 +109,6 @@ files:
108
109
  - lib/jamm/api/models/v1_get_charges_response.rb
109
110
  - lib/jamm/api/models/v1_get_contract_response.rb
110
111
  - lib/jamm/api/models/v1_get_customer_response.rb
111
- - lib/jamm/api/models/v1_get_major_banks_response.rb
112
112
  - lib/jamm/api/models/v1_initial_charge.rb
113
113
  - lib/jamm/api/models/v1_kyc_status.rb
114
114
  - lib/jamm/api/models/v1_merchant.rb
@@ -131,6 +131,10 @@ files:
131
131
  - lib/jamm/api/models/v1_update_customer_response.rb
132
132
  - lib/jamm/api/models/v1_url.rb
133
133
  - lib/jamm/api/models/v1_user_account_message.rb
134
+ - lib/jamm/api/models/v1_withdraw_async_request.rb
135
+ - lib/jamm/api/models/v1_withdraw_async_response.rb
136
+ - lib/jamm/api/models/v1_withdraw_async_status_request.rb
137
+ - lib/jamm/api/models/v1_withdraw_async_status_response.rb
134
138
  - lib/jamm/api/models/v1_withdraw_request.rb
135
139
  - lib/jamm/api/models/v1_withdraw_response.rb
136
140
  - lib/jamm/api/version.rb