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,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,7 @@ require 'time'
|
|
16
16
|
module Api
|
17
17
|
# Contains the result of a charge operation.
|
18
18
|
class ChargeResult
|
19
|
-
attr_accessor :charge_id
|
19
|
+
attr_accessor :charge_id
|
20
20
|
|
21
21
|
# True when charged.
|
22
22
|
attr_accessor :paid
|
@@ -24,24 +24,48 @@ module Api
|
|
24
24
|
# Reason contains enum status in string. Merchant should not write any code depending on the reason, because Jamm may update the reason at any time.
|
25
25
|
attr_accessor :reason
|
26
26
|
|
27
|
+
attr_accessor :description
|
28
|
+
|
29
|
+
attr_accessor :merchant_name
|
30
|
+
|
31
|
+
attr_accessor :initial_amount
|
32
|
+
|
33
|
+
attr_accessor :discount
|
34
|
+
|
35
|
+
attr_accessor :final_amount
|
36
|
+
|
37
|
+
attr_accessor :amount_refunded
|
38
|
+
|
39
|
+
attr_accessor :currency
|
40
|
+
|
41
|
+
attr_accessor :token_id
|
42
|
+
|
43
|
+
attr_accessor :metadata
|
44
|
+
|
45
|
+
attr_accessor :created_at
|
46
|
+
|
47
|
+
attr_accessor :updated_at
|
48
|
+
|
49
|
+
attr_accessor :processed_at
|
50
|
+
|
27
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
52
|
def self.attribute_map
|
29
53
|
{
|
30
|
-
:charge_id => :chargeId,
|
31
|
-
:paid => :paid,
|
32
|
-
:reason => :reason,
|
33
|
-
:description => :description,
|
34
|
-
:merchant_name => :merchantName,
|
35
|
-
:initial_amount => :initialAmount,
|
36
|
-
:discount => :discount,
|
37
|
-
:final_amount => :finalAmount,
|
38
|
-
:amount_refunded => :amountRefunded,
|
39
|
-
:currency => :currency,
|
40
|
-
:token_id => :tokenId,
|
41
|
-
:metadata => :metadata,
|
42
|
-
:created_at => :createdAt,
|
43
|
-
:updated_at => :updatedAt,
|
44
|
-
:processed_at => :processedAt
|
54
|
+
:'charge_id' => :'chargeId',
|
55
|
+
:'paid' => :'paid',
|
56
|
+
:'reason' => :'reason',
|
57
|
+
:'description' => :'description',
|
58
|
+
:'merchant_name' => :'merchantName',
|
59
|
+
:'initial_amount' => :'initialAmount',
|
60
|
+
:'discount' => :'discount',
|
61
|
+
:'final_amount' => :'finalAmount',
|
62
|
+
:'amount_refunded' => :'amountRefunded',
|
63
|
+
:'currency' => :'currency',
|
64
|
+
:'token_id' => :'tokenId',
|
65
|
+
:'metadata' => :'metadata',
|
66
|
+
:'created_at' => :'createdAt',
|
67
|
+
:'updated_at' => :'updatedAt',
|
68
|
+
:'processed_at' => :'processedAt'
|
45
69
|
}
|
46
70
|
end
|
47
71
|
|
@@ -53,81 +77,114 @@ module Api
|
|
53
77
|
# Attribute type mapping.
|
54
78
|
def self.openapi_types
|
55
79
|
{
|
56
|
-
:charge_id => :String,
|
57
|
-
:paid => :Boolean,
|
58
|
-
:reason => :String,
|
59
|
-
:description => :String,
|
60
|
-
:merchant_name => :String,
|
61
|
-
:initial_amount => :Integer,
|
62
|
-
:discount => :Integer,
|
63
|
-
:final_amount => :Integer,
|
64
|
-
:amount_refunded => :Integer,
|
65
|
-
:currency => :String,
|
66
|
-
:token_id => :String,
|
67
|
-
:metadata => :'Hash<String, String>',
|
68
|
-
:created_at => :Time,
|
69
|
-
:updated_at => :Time,
|
70
|
-
:processed_at => :Time
|
80
|
+
:'charge_id' => :'String',
|
81
|
+
:'paid' => :'Boolean',
|
82
|
+
:'reason' => :'String',
|
83
|
+
:'description' => :'String',
|
84
|
+
:'merchant_name' => :'String',
|
85
|
+
:'initial_amount' => :'Integer',
|
86
|
+
:'discount' => :'Integer',
|
87
|
+
:'final_amount' => :'Integer',
|
88
|
+
:'amount_refunded' => :'Integer',
|
89
|
+
:'currency' => :'String',
|
90
|
+
:'token_id' => :'String',
|
91
|
+
:'metadata' => :'Hash<String, String>',
|
92
|
+
:'created_at' => :'Time',
|
93
|
+
:'updated_at' => :'Time',
|
94
|
+
:'processed_at' => :'Time'
|
71
95
|
}
|
72
96
|
end
|
73
97
|
|
74
98
|
# List of attributes with nullable: true
|
75
99
|
def self.openapi_nullable
|
76
|
-
Set.new([
|
100
|
+
Set.new([
|
101
|
+
])
|
77
102
|
end
|
78
103
|
|
79
104
|
# Initializes the object
|
80
105
|
# @param [Hash] attributes Model attributes in the form of hash
|
81
106
|
def initialize(attributes = {})
|
82
|
-
|
107
|
+
if (!attributes.is_a?(Hash))
|
108
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::ChargeResult` initialize method"
|
109
|
+
end
|
83
110
|
|
84
111
|
# check to see if the attribute exists and convert string to symbol for hash key
|
85
|
-
attributes = attributes.each_with_object({})
|
86
|
-
|
87
|
-
|
112
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
113
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
114
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::ChargeResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
115
|
+
end
|
88
116
|
h[k.to_sym] = v
|
89
|
-
|
90
|
-
|
91
|
-
self.charge_id = attributes[:charge_id] if attributes.key?(:charge_id)
|
117
|
+
}
|
92
118
|
|
93
|
-
|
119
|
+
if attributes.key?(:'charge_id')
|
120
|
+
self.charge_id = attributes[:'charge_id']
|
121
|
+
end
|
94
122
|
|
95
|
-
|
123
|
+
if attributes.key?(:'paid')
|
124
|
+
self.paid = attributes[:'paid']
|
125
|
+
end
|
96
126
|
|
97
|
-
|
127
|
+
if attributes.key?(:'reason')
|
128
|
+
self.reason = attributes[:'reason']
|
129
|
+
end
|
98
130
|
|
99
|
-
|
131
|
+
if attributes.key?(:'description')
|
132
|
+
self.description = attributes[:'description']
|
133
|
+
end
|
100
134
|
|
101
|
-
|
135
|
+
if attributes.key?(:'merchant_name')
|
136
|
+
self.merchant_name = attributes[:'merchant_name']
|
137
|
+
end
|
102
138
|
|
103
|
-
|
139
|
+
if attributes.key?(:'initial_amount')
|
140
|
+
self.initial_amount = attributes[:'initial_amount']
|
141
|
+
end
|
104
142
|
|
105
|
-
|
143
|
+
if attributes.key?(:'discount')
|
144
|
+
self.discount = attributes[:'discount']
|
145
|
+
end
|
106
146
|
|
107
|
-
|
147
|
+
if attributes.key?(:'final_amount')
|
148
|
+
self.final_amount = attributes[:'final_amount']
|
149
|
+
end
|
108
150
|
|
109
|
-
|
151
|
+
if attributes.key?(:'amount_refunded')
|
152
|
+
self.amount_refunded = attributes[:'amount_refunded']
|
153
|
+
end
|
110
154
|
|
111
|
-
|
155
|
+
if attributes.key?(:'currency')
|
156
|
+
self.currency = attributes[:'currency']
|
157
|
+
end
|
112
158
|
|
113
|
-
if attributes.key?(:
|
114
|
-
self.
|
159
|
+
if attributes.key?(:'token_id')
|
160
|
+
self.token_id = attributes[:'token_id']
|
115
161
|
end
|
116
162
|
|
117
|
-
|
163
|
+
if attributes.key?(:'metadata')
|
164
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
165
|
+
self.metadata = value
|
166
|
+
end
|
167
|
+
end
|
118
168
|
|
119
|
-
|
169
|
+
if attributes.key?(:'created_at')
|
170
|
+
self.created_at = attributes[:'created_at']
|
171
|
+
end
|
120
172
|
|
121
|
-
|
173
|
+
if attributes.key?(:'updated_at')
|
174
|
+
self.updated_at = attributes[:'updated_at']
|
175
|
+
end
|
122
176
|
|
123
|
-
|
177
|
+
if attributes.key?(:'processed_at')
|
178
|
+
self.processed_at = attributes[:'processed_at']
|
179
|
+
end
|
124
180
|
end
|
125
181
|
|
126
182
|
# Show invalid properties with the reasons. Usually used together with valid?
|
127
183
|
# @return Array for valid properties with the reasons
|
128
184
|
def list_invalid_properties
|
129
185
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
130
|
-
|
186
|
+
invalid_properties = Array.new
|
187
|
+
invalid_properties
|
131
188
|
end
|
132
189
|
|
133
190
|
# Check to see if the all the properties in the model are valid
|
@@ -139,31 +196,30 @@ module Api
|
|
139
196
|
|
140
197
|
# Checks equality by comparing each attribute.
|
141
198
|
# @param [Object] Object to be compared
|
142
|
-
def ==(
|
143
|
-
return true if equal?(
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
processed_at == other.processed_at
|
199
|
+
def ==(o)
|
200
|
+
return true if self.equal?(o)
|
201
|
+
self.class == o.class &&
|
202
|
+
charge_id == o.charge_id &&
|
203
|
+
paid == o.paid &&
|
204
|
+
reason == o.reason &&
|
205
|
+
description == o.description &&
|
206
|
+
merchant_name == o.merchant_name &&
|
207
|
+
initial_amount == o.initial_amount &&
|
208
|
+
discount == o.discount &&
|
209
|
+
final_amount == o.final_amount &&
|
210
|
+
amount_refunded == o.amount_refunded &&
|
211
|
+
currency == o.currency &&
|
212
|
+
token_id == o.token_id &&
|
213
|
+
metadata == o.metadata &&
|
214
|
+
created_at == o.created_at &&
|
215
|
+
updated_at == o.updated_at &&
|
216
|
+
processed_at == o.processed_at
|
161
217
|
end
|
162
218
|
|
163
219
|
# @see the `==` method
|
164
220
|
# @param [Object] Object to be compared
|
165
|
-
def eql?(
|
166
|
-
self ==
|
221
|
+
def eql?(o)
|
222
|
+
self == o
|
167
223
|
end
|
168
224
|
|
169
225
|
# Calculates hash code according to all attributes.
|
@@ -177,18 +233,19 @@ module Api
|
|
177
233
|
# @return [Object] Returns the model itself
|
178
234
|
def self.build_from_hash(attributes)
|
179
235
|
return nil unless attributes.is_a?(Hash)
|
180
|
-
|
181
236
|
attributes = attributes.transform_keys(&:to_sym)
|
182
237
|
transformed_hash = {}
|
183
238
|
openapi_types.each_pair do |key, type|
|
184
239
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
185
|
-
transformed_hash[key
|
240
|
+
transformed_hash["#{key}"] = nil
|
186
241
|
elsif type =~ /\AArray<(.*)>/i
|
187
242
|
# check to ensure the input is an array given that the attribute
|
188
243
|
# is documented as an array but the input is not
|
189
|
-
|
244
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
245
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
246
|
+
end
|
190
247
|
elsif !attributes[attribute_map[key]].nil?
|
191
|
-
transformed_hash[key
|
248
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
192
249
|
end
|
193
250
|
end
|
194
251
|
new(transformed_hash)
|
@@ -254,7 +311,7 @@ module Api
|
|
254
311
|
def to_hash
|
255
312
|
hash = {}
|
256
313
|
self.class.attribute_map.each_pair do |attr, param|
|
257
|
-
value = send(attr)
|
314
|
+
value = self.send(attr)
|
258
315
|
if value.nil?
|
259
316
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
260
317
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -282,5 +339,7 @@ module Api
|
|
282
339
|
value
|
283
340
|
end
|
284
341
|
end
|
342
|
+
|
285
343
|
end
|
344
|
+
|
286
345
|
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'
|
@@ -28,7 +28,8 @@ module Api
|
|
28
28
|
attr_accessor :updated_at
|
29
29
|
|
30
30
|
class EnumAttributeValidator
|
31
|
-
attr_reader :datatype
|
31
|
+
attr_reader :datatype
|
32
|
+
attr_reader :allowable_values
|
32
33
|
|
33
34
|
def initialize(datatype, allowable_values)
|
34
35
|
@allowable_values = allowable_values.map do |value|
|
@@ -51,10 +52,10 @@ module Api
|
|
51
52
|
# Attribute mapping from ruby-style variable name to JSON key.
|
52
53
|
def self.attribute_map
|
53
54
|
{
|
54
|
-
:id => :id,
|
55
|
-
:status => :status,
|
56
|
-
:created_at => :createdAt,
|
57
|
-
:updated_at => :updatedAt
|
55
|
+
:'id' => :'id',
|
56
|
+
:'status' => :'status',
|
57
|
+
:'created_at' => :'createdAt',
|
58
|
+
:'updated_at' => :'updatedAt'
|
58
59
|
}
|
59
60
|
end
|
60
61
|
|
@@ -66,50 +67,59 @@ module Api
|
|
66
67
|
# Attribute type mapping.
|
67
68
|
def self.openapi_types
|
68
69
|
{
|
69
|
-
:id => :String,
|
70
|
-
:status => :ContractStatus,
|
71
|
-
:created_at => :Time,
|
72
|
-
:updated_at => :Time
|
70
|
+
:'id' => :'String',
|
71
|
+
:'status' => :'ContractStatus',
|
72
|
+
:'created_at' => :'Time',
|
73
|
+
:'updated_at' => :'Time'
|
73
74
|
}
|
74
75
|
end
|
75
76
|
|
76
77
|
# List of attributes with nullable: true
|
77
78
|
def self.openapi_nullable
|
78
|
-
Set.new([
|
79
|
+
Set.new([
|
80
|
+
])
|
79
81
|
end
|
80
82
|
|
81
83
|
# Initializes the object
|
82
84
|
# @param [Hash] attributes Model attributes in the form of hash
|
83
85
|
def initialize(attributes = {})
|
84
|
-
|
86
|
+
if (!attributes.is_a?(Hash))
|
87
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::Contract` initialize method"
|
88
|
+
end
|
85
89
|
|
86
90
|
# check to see if the attribute exists and convert string to symbol for hash key
|
87
|
-
attributes = attributes.each_with_object({})
|
88
|
-
|
89
|
-
|
91
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
92
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
93
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::Contract`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
94
|
+
end
|
90
95
|
h[k.to_sym] = v
|
91
|
-
|
92
|
-
|
93
|
-
self.id = attributes[:id] if attributes.key?(:id)
|
96
|
+
}
|
94
97
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
'CONTRACT_STATUS_UNSPECIFIED'
|
99
|
-
end
|
98
|
+
if attributes.key?(:'id')
|
99
|
+
self.id = attributes[:'id']
|
100
|
+
end
|
100
101
|
|
101
|
-
|
102
|
+
if attributes.key?(:'status')
|
103
|
+
self.status = attributes[:'status']
|
104
|
+
else
|
105
|
+
self.status = 'CONTRACT_STATUS_UNSPECIFIED'
|
106
|
+
end
|
102
107
|
|
103
|
-
|
108
|
+
if attributes.key?(:'created_at')
|
109
|
+
self.created_at = attributes[:'created_at']
|
110
|
+
end
|
104
111
|
|
105
|
-
|
112
|
+
if attributes.key?(:'updated_at')
|
113
|
+
self.updated_at = attributes[:'updated_at']
|
114
|
+
end
|
106
115
|
end
|
107
116
|
|
108
117
|
# Show invalid properties with the reasons. Usually used together with valid?
|
109
118
|
# @return Array for valid properties with the reasons
|
110
119
|
def list_invalid_properties
|
111
120
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
112
|
-
|
121
|
+
invalid_properties = Array.new
|
122
|
+
invalid_properties
|
113
123
|
end
|
114
124
|
|
115
125
|
# Check to see if the all the properties in the model are valid
|
@@ -121,20 +131,19 @@ module Api
|
|
121
131
|
|
122
132
|
# Checks equality by comparing each attribute.
|
123
133
|
# @param [Object] Object to be compared
|
124
|
-
def ==(
|
125
|
-
return true if equal?(
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
updated_at == other.updated_at
|
134
|
+
def ==(o)
|
135
|
+
return true if self.equal?(o)
|
136
|
+
self.class == o.class &&
|
137
|
+
id == o.id &&
|
138
|
+
status == o.status &&
|
139
|
+
created_at == o.created_at &&
|
140
|
+
updated_at == o.updated_at
|
132
141
|
end
|
133
142
|
|
134
143
|
# @see the `==` method
|
135
144
|
# @param [Object] Object to be compared
|
136
|
-
def eql?(
|
137
|
-
self ==
|
145
|
+
def eql?(o)
|
146
|
+
self == o
|
138
147
|
end
|
139
148
|
|
140
149
|
# Calculates hash code according to all attributes.
|
@@ -148,18 +157,19 @@ module Api
|
|
148
157
|
# @return [Object] Returns the model itself
|
149
158
|
def self.build_from_hash(attributes)
|
150
159
|
return nil unless attributes.is_a?(Hash)
|
151
|
-
|
152
160
|
attributes = attributes.transform_keys(&:to_sym)
|
153
161
|
transformed_hash = {}
|
154
162
|
openapi_types.each_pair do |key, type|
|
155
163
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
156
|
-
transformed_hash[key
|
164
|
+
transformed_hash["#{key}"] = nil
|
157
165
|
elsif type =~ /\AArray<(.*)>/i
|
158
166
|
# check to ensure the input is an array given that the attribute
|
159
167
|
# is documented as an array but the input is not
|
160
|
-
|
168
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
169
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
170
|
+
end
|
161
171
|
elsif !attributes[attribute_map[key]].nil?
|
162
|
-
transformed_hash[key
|
172
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
163
173
|
end
|
164
174
|
end
|
165
175
|
new(transformed_hash)
|
@@ -225,7 +235,7 @@ module Api
|
|
225
235
|
def to_hash
|
226
236
|
hash = {}
|
227
237
|
self.class.attribute_map.each_pair do |attr, param|
|
228
|
-
value = send(attr)
|
238
|
+
value = self.send(attr)
|
229
239
|
if value.nil?
|
230
240
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
231
241
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -253,5 +263,7 @@ module Api
|
|
253
263
|
value
|
254
264
|
end
|
255
265
|
end
|
266
|
+
|
256
267
|
end
|
268
|
+
|
257
269
|
end
|