jamm 1.0.2 → 1.0.4
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 +2 -4
- data/lib/jamm/api/models/v1_contract.rb +33 -1
- data/lib/jamm/api/models/v1_contract_status.rb +48 -0
- data/lib/jamm/api.rb +1 -0
- data/lib/jamm/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: deb0aa2025b4b68b8c4a3872ae094e76cb734ff6301bc0d208b4231e60cb363e
|
4
|
+
data.tar.gz: a84029a8041fe88dd7812685c5ee70d3e5375eba3411dc40f5aefda0e218b048
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7899440f22d582024b079342701534a72ff490654f29e9f9c6f4f577e969b553e99cd4299d2e0ae4ebff85fecbfb08898af0efe0e42f025ef44e8a31c2a5b1e0
|
7
|
+
data.tar.gz: d91e0b2376b51d8786a230fc2deb56e1d7389349cf44dfb74e48212513f14c2b35be1c60e9a9026f7a9803bfea319e8a4dab2b3f772f3e4b245eeaaea4e4385b
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jamm (1.0.
|
4
|
+
jamm (1.0.4)
|
5
5
|
rest-client (~> 2.0)
|
6
6
|
typhoeus (~> 1.0, >= 1.0.1)
|
7
7
|
|
@@ -51,8 +51,7 @@ GEM
|
|
51
51
|
http-cookie (>= 1.0.2, < 2.0)
|
52
52
|
mime-types (>= 1.16, < 4.0)
|
53
53
|
netrc (~> 0.8)
|
54
|
-
rexml (3.3.
|
55
|
-
strscan
|
54
|
+
rexml (3.3.9)
|
56
55
|
rubocop (1.63.3)
|
57
56
|
json (~> 2.3)
|
58
57
|
language_server-protocol (>= 3.17.0)
|
@@ -68,7 +67,6 @@ GEM
|
|
68
67
|
parser (>= 3.3.0.4)
|
69
68
|
ruby-progressbar (1.13.0)
|
70
69
|
ruby2_keywords (0.0.5)
|
71
|
-
strscan (3.1.0)
|
72
70
|
test-unit (3.6.2)
|
73
71
|
power_assert
|
74
72
|
typhoeus (1.4.1)
|
@@ -19,16 +19,40 @@ module Api
|
|
19
19
|
# 契約ID (例: con-1234567890) @gotags: validate:\"required\"
|
20
20
|
attr_accessor :id
|
21
21
|
|
22
|
+
attr_accessor :status
|
23
|
+
|
22
24
|
# Created date of the contract. 契約の作成日時。
|
23
25
|
attr_accessor :created_at
|
24
26
|
|
25
27
|
# Updated date of the contract. 契約の更新日時。
|
26
28
|
attr_accessor :updated_at
|
27
29
|
|
30
|
+
class EnumAttributeValidator
|
31
|
+
attr_reader :datatype, :allowable_values
|
32
|
+
|
33
|
+
def initialize(datatype, allowable_values)
|
34
|
+
@allowable_values = allowable_values.map do |value|
|
35
|
+
case datatype.to_s
|
36
|
+
when /Integer/i
|
37
|
+
value.to_i
|
38
|
+
when /Float/i
|
39
|
+
value.to_f
|
40
|
+
else
|
41
|
+
value
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def valid?(value)
|
47
|
+
!value || allowable_values.include?(value)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
28
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
29
52
|
def self.attribute_map
|
30
53
|
{
|
31
54
|
:id => :id,
|
55
|
+
:status => :status,
|
32
56
|
:created_at => :createdAt,
|
33
57
|
:updated_at => :updatedAt
|
34
58
|
}
|
@@ -43,6 +67,7 @@ module Api
|
|
43
67
|
def self.openapi_types
|
44
68
|
{
|
45
69
|
:id => :String,
|
70
|
+
:status => :ContractStatus,
|
46
71
|
:created_at => :Time,
|
47
72
|
:updated_at => :Time
|
48
73
|
}
|
@@ -67,6 +92,12 @@ module Api
|
|
67
92
|
|
68
93
|
self.id = attributes[:id] if attributes.key?(:id)
|
69
94
|
|
95
|
+
self.status = if attributes.key?(:status)
|
96
|
+
attributes[:status]
|
97
|
+
else
|
98
|
+
'CONTRACT_STATUS_UNSPECIFIED'
|
99
|
+
end
|
100
|
+
|
70
101
|
self.created_at = attributes[:created_at] if attributes.key?(:created_at)
|
71
102
|
|
72
103
|
return unless attributes.key?(:updated_at)
|
@@ -95,6 +126,7 @@ module Api
|
|
95
126
|
|
96
127
|
self.class == other.class &&
|
97
128
|
id == other.id &&
|
129
|
+
status == other.status &&
|
98
130
|
created_at == other.created_at &&
|
99
131
|
updated_at == other.updated_at
|
100
132
|
end
|
@@ -108,7 +140,7 @@ module Api
|
|
108
140
|
# Calculates hash code according to all attributes.
|
109
141
|
# @return [Integer] Hash code
|
110
142
|
def hash
|
111
|
-
[id, created_at, updated_at].hash
|
143
|
+
[id, status, created_at, updated_at].hash
|
112
144
|
end
|
113
145
|
|
114
146
|
# Builds the object from hash
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# #api/v1/common.proto
|
4
|
+
#
|
5
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
6
|
+
#
|
7
|
+
# The version of the OpenAPI document: version not set
|
8
|
+
#
|
9
|
+
# Generated by: https://openapi-generator.tech
|
10
|
+
# Generator version: 7.9.0
|
11
|
+
#
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Api
|
17
|
+
class ContractStatus
|
18
|
+
UNSPECIFIED = 'CONTRACT_STATUS_UNSPECIFIED'
|
19
|
+
INITIAL = 'CONTRACT_STATUS_INITIAL'
|
20
|
+
APPROVED = 'CONTRACT_STATUS_APPROVED'
|
21
|
+
ACTIVATED = 'CONTRACT_STATUS_ACTIVATED'
|
22
|
+
WAITING_EKYC = 'CONTRACT_STATUS_WAITING_EKYC'
|
23
|
+
EXPIRED = 'CONTRACT_STATUS_EXPIRED'
|
24
|
+
DEACTIVATED = 'CONTRACT_STATUS_DEACTIVATED'
|
25
|
+
CANCELLED = 'CONTRACT_STATUS_CANCELLED'
|
26
|
+
PENDING_CHARGE = 'CONTRACT_STATUS_PENDING_CHARGE'
|
27
|
+
|
28
|
+
def self.all_vars
|
29
|
+
@all_vars ||= [UNSPECIFIED, INITIAL, APPROVED, ACTIVATED, WAITING_EKYC, EXPIRED, DEACTIVATED, CANCELLED, PENDING_CHARGE].freeze
|
30
|
+
end
|
31
|
+
|
32
|
+
# Builds the enum from string
|
33
|
+
# @param [String] The enum value in the form of the string
|
34
|
+
# @return [String] The enum value
|
35
|
+
def self.build_from_hash(value)
|
36
|
+
new.build_from_hash(value)
|
37
|
+
end
|
38
|
+
|
39
|
+
# Builds the enum from string
|
40
|
+
# @param [String] The enum value in the form of the string
|
41
|
+
# @return [String] The enum value
|
42
|
+
def build_from_hash(value)
|
43
|
+
return value if ContractStatus.all_vars.include?(value)
|
44
|
+
|
45
|
+
raise "Invalid ENUM value #{value} for class #ContractStatus"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
data/lib/jamm/api.rb
CHANGED
@@ -23,6 +23,7 @@ require 'jamm/api/models/rpc_status'
|
|
23
23
|
require 'jamm/api/models/v1_buyer'
|
24
24
|
require 'jamm/api/models/v1_charge'
|
25
25
|
require 'jamm/api/models/v1_contract'
|
26
|
+
require 'jamm/api/models/v1_contract_status'
|
26
27
|
require 'jamm/api/models/v1_create_contract_with_charge_request'
|
27
28
|
require 'jamm/api/models/v1_create_contract_with_charge_response'
|
28
29
|
require 'jamm/api/models/v1_create_contract_without_charge_request'
|
data/lib/jamm/version.rb
CHANGED
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.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamm
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- lib/jamm/api/models/v1_buyer.rb
|
73
73
|
- lib/jamm/api/models/v1_charge.rb
|
74
74
|
- lib/jamm/api/models/v1_contract.rb
|
75
|
+
- lib/jamm/api/models/v1_contract_status.rb
|
75
76
|
- lib/jamm/api/models/v1_create_contract_with_charge_request.rb
|
76
77
|
- lib/jamm/api/models/v1_create_contract_with_charge_response.rb
|
77
78
|
- lib/jamm/api/models/v1_create_contract_without_charge_request.rb
|
@@ -101,7 +102,7 @@ licenses:
|
|
101
102
|
- MIT
|
102
103
|
metadata:
|
103
104
|
source_code_uri: https://github.com/jamm-pay/Jamm-SDK-Ruby
|
104
|
-
post_install_message:
|
105
|
+
post_install_message:
|
105
106
|
rdoc_options: []
|
106
107
|
require_paths:
|
107
108
|
- lib
|
@@ -116,8 +117,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
117
|
- !ruby/object:Gem::Version
|
117
118
|
version: '0'
|
118
119
|
requirements: []
|
119
|
-
rubygems_version: 3.
|
120
|
-
signing_key:
|
120
|
+
rubygems_version: 3.4.19
|
121
|
+
signing_key:
|
121
122
|
specification_version: 4
|
122
123
|
summary: Ruby SDK for the Jamm API
|
123
124
|
test_files: []
|