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