maytes-api-client-rb 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +47 -0
- data/Rakefile +10 -0
- data/docs/CancelCheckout409Response.md +24 -0
- data/docs/CancelCheckoutRequest.md +18 -0
- data/docs/CancelCheckoutResponse.md +18 -0
- data/docs/CaptureCheckout409Response.md +24 -0
- data/docs/CaptureCheckout422Response.md +24 -0
- data/docs/CaptureCheckoutRequest.md +24 -0
- data/docs/CaptureCheckoutResponse.md +18 -0
- data/docs/Checkout.md +48 -0
- data/docs/CheckoutCancelled.md +22 -0
- data/docs/CheckoutCaptured.md +28 -0
- data/docs/CheckoutCreated.md +24 -0
- data/docs/CheckoutDiscount.md +30 -0
- data/docs/CheckoutFee.md +32 -0
- data/docs/CreateCheckout401Response.md +24 -0
- data/docs/CreateCheckout409Response.md +24 -0
- data/docs/CreateCheckout422Response.md +24 -0
- data/docs/CreateCheckoutRequest.md +44 -0
- data/docs/CreateCheckoutResponse.md +18 -0
- data/docs/CreateRefundRequest.md +20 -0
- data/docs/CustomerData.md +22 -0
- data/docs/DefaultApi.md +633 -0
- data/docs/DigitalGoodsCustomData.md +18 -0
- data/docs/DigitalGoodsLineItem.md +38 -0
- data/docs/DonationLineItem.md +36 -0
- data/docs/ErrorResponseDto.md +24 -0
- data/docs/Fee.md +24 -0
- data/docs/FeeBreakdownLine.md +24 -0
- data/docs/FoodBeverageLineItem.md +36 -0
- data/docs/GetCheckout404Response.md +24 -0
- data/docs/GetCheckout422Response.md +24 -0
- data/docs/GetCheckoutResponse.md +18 -0
- data/docs/GetSettlementResponse.md +18 -0
- data/docs/HealthResponse.md +18 -0
- data/docs/LineItem.md +94 -0
- data/docs/ListSettlementsResponse.md +18 -0
- data/docs/OAuthTokenRequest.md +30 -0
- data/docs/OAuthTokenResponse.md +26 -0
- data/docs/OtherLineItem.md +36 -0
- data/docs/PhysicalGoodsCustomData.md +20 -0
- data/docs/PhysicalGoodsLineItem.md +38 -0
- data/docs/RefundCheckout402Response.md +24 -0
- data/docs/RefundCheckout409Response.md +24 -0
- data/docs/ServiceCustomData.md +18 -0
- data/docs/ServiceLineItem.md +38 -0
- data/docs/Settlement.md +52 -0
- data/docs/Tax.md +22 -0
- data/docs/TicketCustomData.md +40 -0
- data/docs/TicketLineItem.md +38 -0
- data/docs/TicketSeating.md +24 -0
- data/lib/maytes_api_client/api/default_api.rb +642 -0
- data/lib/maytes_api_client/api_client.rb +397 -0
- data/lib/maytes_api_client/api_error.rb +58 -0
- data/lib/maytes_api_client/api_model_base.rb +88 -0
- data/lib/maytes_api_client/configuration.rb +316 -0
- data/lib/maytes_api_client/managed_client.rb +140 -0
- data/lib/maytes_api_client/models/cancel_checkout409_response.rb +258 -0
- data/lib/maytes_api_client/models/cancel_checkout_request.rb +147 -0
- data/lib/maytes_api_client/models/cancel_checkout_response.rb +164 -0
- data/lib/maytes_api_client/models/capture_checkout409_response.rb +258 -0
- data/lib/maytes_api_client/models/capture_checkout422_response.rb +258 -0
- data/lib/maytes_api_client/models/capture_checkout_request.rb +218 -0
- data/lib/maytes_api_client/models/capture_checkout_response.rb +164 -0
- data/lib/maytes_api_client/models/checkout.rb +483 -0
- data/lib/maytes_api_client/models/checkout_cancelled.rb +202 -0
- data/lib/maytes_api_client/models/checkout_captured.rb +266 -0
- data/lib/maytes_api_client/models/checkout_created.rb +242 -0
- data/lib/maytes_api_client/models/checkout_discount.rb +329 -0
- data/lib/maytes_api_client/models/checkout_fee.rb +351 -0
- data/lib/maytes_api_client/models/create_checkout401_response.rb +258 -0
- data/lib/maytes_api_client/models/create_checkout409_response.rb +258 -0
- data/lib/maytes_api_client/models/create_checkout422_response.rb +258 -0
- data/lib/maytes_api_client/models/create_checkout_request.rb +444 -0
- data/lib/maytes_api_client/models/create_checkout_response.rb +164 -0
- data/lib/maytes_api_client/models/create_refund_request.rb +212 -0
- data/lib/maytes_api_client/models/customer_data.rb +168 -0
- data/lib/maytes_api_client/models/digital_goods_custom_data.rb +148 -0
- data/lib/maytes_api_client/models/digital_goods_line_item.rb +414 -0
- data/lib/maytes_api_client/models/donation_line_item.rb +405 -0
- data/lib/maytes_api_client/models/error_response_dto.rb +227 -0
- data/lib/maytes_api_client/models/fee.rb +271 -0
- data/lib/maytes_api_client/models/fee_breakdown_line.rb +266 -0
- data/lib/maytes_api_client/models/food_beverage_line_item.rb +405 -0
- data/lib/maytes_api_client/models/get_checkout404_response.rb +258 -0
- data/lib/maytes_api_client/models/get_checkout422_response.rb +258 -0
- data/lib/maytes_api_client/models/get_checkout_response.rb +164 -0
- data/lib/maytes_api_client/models/get_settlement_response.rb +164 -0
- data/lib/maytes_api_client/models/health_response.rb +164 -0
- data/lib/maytes_api_client/models/line_item.rb +65 -0
- data/lib/maytes_api_client/models/list_settlements_response.rb +166 -0
- data/lib/maytes_api_client/models/o_auth_token_request.rb +244 -0
- data/lib/maytes_api_client/models/o_auth_token_response.rb +251 -0
- data/lib/maytes_api_client/models/other_line_item.rb +405 -0
- data/lib/maytes_api_client/models/physical_goods_custom_data.rb +173 -0
- data/lib/maytes_api_client/models/physical_goods_line_item.rb +431 -0
- data/lib/maytes_api_client/models/refund_checkout402_response.rb +258 -0
- data/lib/maytes_api_client/models/refund_checkout409_response.rb +258 -0
- data/lib/maytes_api_client/models/service_custom_data.rb +148 -0
- data/lib/maytes_api_client/models/service_line_item.rb +414 -0
- data/lib/maytes_api_client/models/settlement.rb +526 -0
- data/lib/maytes_api_client/models/tax.rb +202 -0
- data/lib/maytes_api_client/models/ticket_custom_data.rb +333 -0
- data/lib/maytes_api_client/models/ticket_line_item.rb +431 -0
- data/lib/maytes_api_client/models/ticket_seating.rb +176 -0
- data/lib/maytes_api_client/version.rb +15 -0
- data/lib/maytes_api_client/webhook_verifier.rb +212 -0
- data/lib/maytes_api_client.rb +95 -0
- data/maytes_api_client.gemspec +39 -0
- data/spec/api/default_api_spec.rb +145 -0
- data/spec/models/cancel_checkout409_response_spec.rb +58 -0
- data/spec/models/cancel_checkout_request_spec.rb +36 -0
- data/spec/models/cancel_checkout_response_spec.rb +36 -0
- data/spec/models/capture_checkout409_response_spec.rb +58 -0
- data/spec/models/capture_checkout422_response_spec.rb +58 -0
- data/spec/models/capture_checkout_request_spec.rb +54 -0
- data/spec/models/capture_checkout_response_spec.rb +36 -0
- data/spec/models/checkout_cancelled_spec.rb +48 -0
- data/spec/models/checkout_captured_spec.rb +66 -0
- data/spec/models/checkout_created_spec.rb +54 -0
- data/spec/models/checkout_discount_spec.rb +76 -0
- data/spec/models/checkout_fee_spec.rb +86 -0
- data/spec/models/checkout_spec.rb +126 -0
- data/spec/models/create_checkout401_response_spec.rb +58 -0
- data/spec/models/create_checkout409_response_spec.rb +58 -0
- data/spec/models/create_checkout422_response_spec.rb +58 -0
- data/spec/models/create_checkout_request_spec.rb +118 -0
- data/spec/models/create_checkout_response_spec.rb +36 -0
- data/spec/models/create_refund_request_spec.rb +42 -0
- data/spec/models/customer_data_spec.rb +48 -0
- data/spec/models/digital_goods_custom_data_spec.rb +36 -0
- data/spec/models/digital_goods_line_item_spec.rb +100 -0
- data/spec/models/donation_line_item_spec.rb +94 -0
- data/spec/models/error_response_dto_spec.rb +54 -0
- data/spec/models/fee_breakdown_line_spec.rb +58 -0
- data/spec/models/fee_spec.rb +54 -0
- data/spec/models/food_beverage_line_item_spec.rb +94 -0
- data/spec/models/get_checkout404_response_spec.rb +58 -0
- data/spec/models/get_checkout422_response_spec.rb +58 -0
- data/spec/models/get_checkout_response_spec.rb +36 -0
- data/spec/models/get_settlement_response_spec.rb +36 -0
- data/spec/models/health_response_spec.rb +36 -0
- data/spec/models/line_item_spec.rb +44 -0
- data/spec/models/list_settlements_response_spec.rb +36 -0
- data/spec/models/o_auth_token_request_spec.rb +72 -0
- data/spec/models/o_auth_token_response_spec.rb +60 -0
- data/spec/models/other_line_item_spec.rb +94 -0
- data/spec/models/physical_goods_custom_data_spec.rb +42 -0
- data/spec/models/physical_goods_line_item_spec.rb +100 -0
- data/spec/models/refund_checkout402_response_spec.rb +58 -0
- data/spec/models/refund_checkout409_response_spec.rb +58 -0
- data/spec/models/service_custom_data_spec.rb +36 -0
- data/spec/models/service_line_item_spec.rb +100 -0
- data/spec/models/settlement_spec.rb +138 -0
- data/spec/models/tax_spec.rb +48 -0
- data/spec/models/ticket_custom_data_spec.rb +106 -0
- data/spec/models/ticket_line_item_spec.rb +100 -0
- data/spec/models/ticket_seating_spec.rb +54 -0
- data/spec/spec_helper.rb +111 -0
- metadata +295 -0
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Maytes 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.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module MaytesApiClient
|
|
17
|
+
class Settlement < ApiModelBase
|
|
18
|
+
attr_accessor :uuid
|
|
19
|
+
|
|
20
|
+
attr_accessor :merchant_uuid
|
|
21
|
+
|
|
22
|
+
attr_accessor :period_from
|
|
23
|
+
|
|
24
|
+
attr_accessor :period_to
|
|
25
|
+
|
|
26
|
+
attr_accessor :idempotency_key
|
|
27
|
+
|
|
28
|
+
attr_accessor :merchant_payable_amount
|
|
29
|
+
|
|
30
|
+
attr_accessor :settled_amount
|
|
31
|
+
|
|
32
|
+
attr_accessor :currency
|
|
33
|
+
|
|
34
|
+
attr_accessor :status
|
|
35
|
+
|
|
36
|
+
attr_accessor :stripe_transfer_id
|
|
37
|
+
|
|
38
|
+
attr_accessor :notes
|
|
39
|
+
|
|
40
|
+
attr_accessor :settled_at
|
|
41
|
+
|
|
42
|
+
attr_accessor :expires_at
|
|
43
|
+
|
|
44
|
+
attr_accessor :reviewed_by_user_uuid
|
|
45
|
+
|
|
46
|
+
attr_accessor :reviewed_at
|
|
47
|
+
|
|
48
|
+
attr_accessor :rejection_reason
|
|
49
|
+
|
|
50
|
+
attr_accessor :created_at
|
|
51
|
+
|
|
52
|
+
attr_accessor :updated_at
|
|
53
|
+
|
|
54
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
55
|
+
def self.attribute_map
|
|
56
|
+
{
|
|
57
|
+
:'uuid' => :'uuid',
|
|
58
|
+
:'merchant_uuid' => :'merchant_uuid',
|
|
59
|
+
:'period_from' => :'period_from',
|
|
60
|
+
:'period_to' => :'period_to',
|
|
61
|
+
:'idempotency_key' => :'idempotency_key',
|
|
62
|
+
:'merchant_payable_amount' => :'merchant_payable_amount',
|
|
63
|
+
:'settled_amount' => :'settled_amount',
|
|
64
|
+
:'currency' => :'currency',
|
|
65
|
+
:'status' => :'status',
|
|
66
|
+
:'stripe_transfer_id' => :'stripe_transfer_id',
|
|
67
|
+
:'notes' => :'notes',
|
|
68
|
+
:'settled_at' => :'settled_at',
|
|
69
|
+
:'expires_at' => :'expires_at',
|
|
70
|
+
:'reviewed_by_user_uuid' => :'reviewed_by_user_uuid',
|
|
71
|
+
:'reviewed_at' => :'reviewed_at',
|
|
72
|
+
:'rejection_reason' => :'rejection_reason',
|
|
73
|
+
:'created_at' => :'created_at',
|
|
74
|
+
:'updated_at' => :'updated_at'
|
|
75
|
+
}
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Returns attribute mapping this model knows about
|
|
79
|
+
def self.acceptable_attribute_map
|
|
80
|
+
attribute_map
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Returns all the JSON keys this model knows about
|
|
84
|
+
def self.acceptable_attributes
|
|
85
|
+
acceptable_attribute_map.values
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Attribute type mapping.
|
|
89
|
+
def self.openapi_types
|
|
90
|
+
{
|
|
91
|
+
:'uuid' => :'String',
|
|
92
|
+
:'merchant_uuid' => :'String',
|
|
93
|
+
:'period_from' => :'Time',
|
|
94
|
+
:'period_to' => :'Time',
|
|
95
|
+
:'idempotency_key' => :'String',
|
|
96
|
+
:'merchant_payable_amount' => :'Integer',
|
|
97
|
+
:'settled_amount' => :'Integer',
|
|
98
|
+
:'currency' => :'String',
|
|
99
|
+
:'status' => :'String',
|
|
100
|
+
:'stripe_transfer_id' => :'String',
|
|
101
|
+
:'notes' => :'String',
|
|
102
|
+
:'settled_at' => :'Time',
|
|
103
|
+
:'expires_at' => :'Time',
|
|
104
|
+
:'reviewed_by_user_uuid' => :'String',
|
|
105
|
+
:'reviewed_at' => :'Time',
|
|
106
|
+
:'rejection_reason' => :'String',
|
|
107
|
+
:'created_at' => :'Time',
|
|
108
|
+
:'updated_at' => :'Time'
|
|
109
|
+
}
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# List of attributes with nullable: true
|
|
113
|
+
def self.openapi_nullable
|
|
114
|
+
Set.new([
|
|
115
|
+
:'stripe_transfer_id',
|
|
116
|
+
:'notes',
|
|
117
|
+
:'settled_at',
|
|
118
|
+
:'expires_at',
|
|
119
|
+
:'reviewed_by_user_uuid',
|
|
120
|
+
:'reviewed_at',
|
|
121
|
+
:'rejection_reason',
|
|
122
|
+
])
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Initializes the object
|
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
127
|
+
def initialize(attributes = {})
|
|
128
|
+
if (!attributes.is_a?(Hash))
|
|
129
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MaytesApiClient::Settlement` initialize method"
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
133
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
134
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
135
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
136
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MaytesApiClient::Settlement`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
137
|
+
end
|
|
138
|
+
h[k.to_sym] = v
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if attributes.key?(:'uuid')
|
|
142
|
+
self.uuid = attributes[:'uuid']
|
|
143
|
+
else
|
|
144
|
+
self.uuid = nil
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'merchant_uuid')
|
|
148
|
+
self.merchant_uuid = attributes[:'merchant_uuid']
|
|
149
|
+
else
|
|
150
|
+
self.merchant_uuid = nil
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'period_from')
|
|
154
|
+
self.period_from = attributes[:'period_from']
|
|
155
|
+
else
|
|
156
|
+
self.period_from = nil
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'period_to')
|
|
160
|
+
self.period_to = attributes[:'period_to']
|
|
161
|
+
else
|
|
162
|
+
self.period_to = nil
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if attributes.key?(:'idempotency_key')
|
|
166
|
+
self.idempotency_key = attributes[:'idempotency_key']
|
|
167
|
+
else
|
|
168
|
+
self.idempotency_key = nil
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'merchant_payable_amount')
|
|
172
|
+
self.merchant_payable_amount = attributes[:'merchant_payable_amount']
|
|
173
|
+
else
|
|
174
|
+
self.merchant_payable_amount = nil
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if attributes.key?(:'settled_amount')
|
|
178
|
+
self.settled_amount = attributes[:'settled_amount']
|
|
179
|
+
else
|
|
180
|
+
self.settled_amount = nil
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if attributes.key?(:'currency')
|
|
184
|
+
self.currency = attributes[:'currency']
|
|
185
|
+
else
|
|
186
|
+
self.currency = nil
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
if attributes.key?(:'status')
|
|
190
|
+
self.status = attributes[:'status']
|
|
191
|
+
else
|
|
192
|
+
self.status = nil
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if attributes.key?(:'stripe_transfer_id')
|
|
196
|
+
self.stripe_transfer_id = attributes[:'stripe_transfer_id']
|
|
197
|
+
else
|
|
198
|
+
self.stripe_transfer_id = nil
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
if attributes.key?(:'notes')
|
|
202
|
+
self.notes = attributes[:'notes']
|
|
203
|
+
else
|
|
204
|
+
self.notes = nil
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
if attributes.key?(:'settled_at')
|
|
208
|
+
self.settled_at = attributes[:'settled_at']
|
|
209
|
+
else
|
|
210
|
+
self.settled_at = nil
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
if attributes.key?(:'expires_at')
|
|
214
|
+
self.expires_at = attributes[:'expires_at']
|
|
215
|
+
else
|
|
216
|
+
self.expires_at = nil
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if attributes.key?(:'reviewed_by_user_uuid')
|
|
220
|
+
self.reviewed_by_user_uuid = attributes[:'reviewed_by_user_uuid']
|
|
221
|
+
else
|
|
222
|
+
self.reviewed_by_user_uuid = nil
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
if attributes.key?(:'reviewed_at')
|
|
226
|
+
self.reviewed_at = attributes[:'reviewed_at']
|
|
227
|
+
else
|
|
228
|
+
self.reviewed_at = nil
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
if attributes.key?(:'rejection_reason')
|
|
232
|
+
self.rejection_reason = attributes[:'rejection_reason']
|
|
233
|
+
else
|
|
234
|
+
self.rejection_reason = nil
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
if attributes.key?(:'created_at')
|
|
238
|
+
self.created_at = attributes[:'created_at']
|
|
239
|
+
else
|
|
240
|
+
self.created_at = nil
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if attributes.key?(:'updated_at')
|
|
244
|
+
self.updated_at = attributes[:'updated_at']
|
|
245
|
+
else
|
|
246
|
+
self.updated_at = nil
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
251
|
+
# @return Array for valid properties with the reasons
|
|
252
|
+
def list_invalid_properties
|
|
253
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
254
|
+
invalid_properties = Array.new
|
|
255
|
+
if @uuid.nil?
|
|
256
|
+
invalid_properties.push('invalid value for "uuid", uuid cannot be nil.')
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
if @merchant_uuid.nil?
|
|
260
|
+
invalid_properties.push('invalid value for "merchant_uuid", merchant_uuid cannot be nil.')
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
if @period_from.nil?
|
|
264
|
+
invalid_properties.push('invalid value for "period_from", period_from cannot be nil.')
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
if @period_to.nil?
|
|
268
|
+
invalid_properties.push('invalid value for "period_to", period_to cannot be nil.')
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
if @idempotency_key.nil?
|
|
272
|
+
invalid_properties.push('invalid value for "idempotency_key", idempotency_key cannot be nil.')
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
if @merchant_payable_amount.nil?
|
|
276
|
+
invalid_properties.push('invalid value for "merchant_payable_amount", merchant_payable_amount cannot be nil.')
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
if @settled_amount.nil?
|
|
280
|
+
invalid_properties.push('invalid value for "settled_amount", settled_amount cannot be nil.')
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
if @currency.nil?
|
|
284
|
+
invalid_properties.push('invalid value for "currency", currency cannot be nil.')
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
if @currency.to_s.length > 3
|
|
288
|
+
invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.')
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
if @currency.to_s.length < 3
|
|
292
|
+
invalid_properties.push('invalid value for "currency", the character length must be greater than or equal to 3.')
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
if @status.nil?
|
|
296
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
if @created_at.nil?
|
|
300
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
if @updated_at.nil?
|
|
304
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
invalid_properties
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# Check to see if the all the properties in the model are valid
|
|
311
|
+
# @return true if the model is valid
|
|
312
|
+
def valid?
|
|
313
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
314
|
+
return false if @uuid.nil?
|
|
315
|
+
return false if @merchant_uuid.nil?
|
|
316
|
+
return false if @period_from.nil?
|
|
317
|
+
return false if @period_to.nil?
|
|
318
|
+
return false if @idempotency_key.nil?
|
|
319
|
+
return false if @merchant_payable_amount.nil?
|
|
320
|
+
return false if @settled_amount.nil?
|
|
321
|
+
return false if @currency.nil?
|
|
322
|
+
return false if @currency.to_s.length > 3
|
|
323
|
+
return false if @currency.to_s.length < 3
|
|
324
|
+
return false if @status.nil?
|
|
325
|
+
return false if @created_at.nil?
|
|
326
|
+
return false if @updated_at.nil?
|
|
327
|
+
true
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
# Custom attribute writer method with validation
|
|
331
|
+
# @param [Object] uuid Value to be assigned
|
|
332
|
+
def uuid=(uuid)
|
|
333
|
+
if uuid.nil?
|
|
334
|
+
fail ArgumentError, 'uuid cannot be nil'
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
@uuid = uuid
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
# Custom attribute writer method with validation
|
|
341
|
+
# @param [Object] merchant_uuid Value to be assigned
|
|
342
|
+
def merchant_uuid=(merchant_uuid)
|
|
343
|
+
if merchant_uuid.nil?
|
|
344
|
+
fail ArgumentError, 'merchant_uuid cannot be nil'
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
@merchant_uuid = merchant_uuid
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
# Custom attribute writer method with validation
|
|
351
|
+
# @param [Object] period_from Value to be assigned
|
|
352
|
+
def period_from=(period_from)
|
|
353
|
+
if period_from.nil?
|
|
354
|
+
fail ArgumentError, 'period_from cannot be nil'
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
@period_from = period_from
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
# Custom attribute writer method with validation
|
|
361
|
+
# @param [Object] period_to Value to be assigned
|
|
362
|
+
def period_to=(period_to)
|
|
363
|
+
if period_to.nil?
|
|
364
|
+
fail ArgumentError, 'period_to cannot be nil'
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
@period_to = period_to
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
# Custom attribute writer method with validation
|
|
371
|
+
# @param [Object] idempotency_key Value to be assigned
|
|
372
|
+
def idempotency_key=(idempotency_key)
|
|
373
|
+
if idempotency_key.nil?
|
|
374
|
+
fail ArgumentError, 'idempotency_key cannot be nil'
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
@idempotency_key = idempotency_key
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
# Custom attribute writer method with validation
|
|
381
|
+
# @param [Object] merchant_payable_amount Value to be assigned
|
|
382
|
+
def merchant_payable_amount=(merchant_payable_amount)
|
|
383
|
+
if merchant_payable_amount.nil?
|
|
384
|
+
fail ArgumentError, 'merchant_payable_amount cannot be nil'
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
@merchant_payable_amount = merchant_payable_amount
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
# Custom attribute writer method with validation
|
|
391
|
+
# @param [Object] settled_amount Value to be assigned
|
|
392
|
+
def settled_amount=(settled_amount)
|
|
393
|
+
if settled_amount.nil?
|
|
394
|
+
fail ArgumentError, 'settled_amount cannot be nil'
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
@settled_amount = settled_amount
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
# Custom attribute writer method with validation
|
|
401
|
+
# @param [Object] currency Value to be assigned
|
|
402
|
+
def currency=(currency)
|
|
403
|
+
if currency.nil?
|
|
404
|
+
fail ArgumentError, 'currency cannot be nil'
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
if currency.to_s.length > 3
|
|
408
|
+
fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.'
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
if currency.to_s.length < 3
|
|
412
|
+
fail ArgumentError, 'invalid value for "currency", the character length must be greater than or equal to 3.'
|
|
413
|
+
end
|
|
414
|
+
|
|
415
|
+
@currency = currency
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
# Custom attribute writer method with validation
|
|
419
|
+
# @param [Object] status Value to be assigned
|
|
420
|
+
def status=(status)
|
|
421
|
+
if status.nil?
|
|
422
|
+
fail ArgumentError, 'status cannot be nil'
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
@status = status
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
# Custom attribute writer method with validation
|
|
429
|
+
# @param [Object] created_at Value to be assigned
|
|
430
|
+
def created_at=(created_at)
|
|
431
|
+
if created_at.nil?
|
|
432
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
433
|
+
end
|
|
434
|
+
|
|
435
|
+
@created_at = created_at
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
# Custom attribute writer method with validation
|
|
439
|
+
# @param [Object] updated_at Value to be assigned
|
|
440
|
+
def updated_at=(updated_at)
|
|
441
|
+
if updated_at.nil?
|
|
442
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
@updated_at = updated_at
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
# Checks equality by comparing each attribute.
|
|
449
|
+
# @param [Object] Object to be compared
|
|
450
|
+
def ==(o)
|
|
451
|
+
return true if self.equal?(o)
|
|
452
|
+
self.class == o.class &&
|
|
453
|
+
uuid == o.uuid &&
|
|
454
|
+
merchant_uuid == o.merchant_uuid &&
|
|
455
|
+
period_from == o.period_from &&
|
|
456
|
+
period_to == o.period_to &&
|
|
457
|
+
idempotency_key == o.idempotency_key &&
|
|
458
|
+
merchant_payable_amount == o.merchant_payable_amount &&
|
|
459
|
+
settled_amount == o.settled_amount &&
|
|
460
|
+
currency == o.currency &&
|
|
461
|
+
status == o.status &&
|
|
462
|
+
stripe_transfer_id == o.stripe_transfer_id &&
|
|
463
|
+
notes == o.notes &&
|
|
464
|
+
settled_at == o.settled_at &&
|
|
465
|
+
expires_at == o.expires_at &&
|
|
466
|
+
reviewed_by_user_uuid == o.reviewed_by_user_uuid &&
|
|
467
|
+
reviewed_at == o.reviewed_at &&
|
|
468
|
+
rejection_reason == o.rejection_reason &&
|
|
469
|
+
created_at == o.created_at &&
|
|
470
|
+
updated_at == o.updated_at
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
# @see the `==` method
|
|
474
|
+
# @param [Object] Object to be compared
|
|
475
|
+
def eql?(o)
|
|
476
|
+
self == o
|
|
477
|
+
end
|
|
478
|
+
|
|
479
|
+
# Calculates hash code according to all attributes.
|
|
480
|
+
# @return [Integer] Hash code
|
|
481
|
+
def hash
|
|
482
|
+
[uuid, merchant_uuid, period_from, period_to, idempotency_key, merchant_payable_amount, settled_amount, currency, status, stripe_transfer_id, notes, settled_at, expires_at, reviewed_by_user_uuid, reviewed_at, rejection_reason, created_at, updated_at].hash
|
|
483
|
+
end
|
|
484
|
+
|
|
485
|
+
# Builds the object from hash
|
|
486
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
487
|
+
# @return [Object] Returns the model itself
|
|
488
|
+
def self.build_from_hash(attributes)
|
|
489
|
+
return nil unless attributes.is_a?(Hash)
|
|
490
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
491
|
+
transformed_hash = {}
|
|
492
|
+
openapi_types.each_pair do |key, type|
|
|
493
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
494
|
+
transformed_hash["#{key}"] = nil
|
|
495
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
496
|
+
# check to ensure the input is an array given that the attribute
|
|
497
|
+
# is documented as an array but the input is not
|
|
498
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
499
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
500
|
+
end
|
|
501
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
502
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
503
|
+
end
|
|
504
|
+
end
|
|
505
|
+
new(transformed_hash)
|
|
506
|
+
end
|
|
507
|
+
|
|
508
|
+
# Returns the object in the form of hash
|
|
509
|
+
# @return [Hash] Returns the object in the form of hash
|
|
510
|
+
def to_hash
|
|
511
|
+
hash = {}
|
|
512
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
513
|
+
value = self.send(attr)
|
|
514
|
+
if value.nil?
|
|
515
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
516
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
517
|
+
end
|
|
518
|
+
|
|
519
|
+
hash[param] = _to_hash(value)
|
|
520
|
+
end
|
|
521
|
+
hash
|
|
522
|
+
end
|
|
523
|
+
|
|
524
|
+
end
|
|
525
|
+
|
|
526
|
+
end
|