ultracart_api 4.1.19 → 4.1.20
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/README.md +10 -10
- data/docs/CustomDashboardSchedule.md +26 -0
- data/docs/{ChargebackDisputeResponse.md → CustomDashboardScheduleResponse.md} +4 -4
- data/docs/{ChargebackDisputesResponse.md → CustomDashboardSchedulesResponse.md} +4 -4
- data/docs/CustomReport.md +2 -0
- data/docs/DatawarehouseApi.md +220 -0
- data/docs/EmailCampaign.md +4 -0
- data/lib/ultracart_api/api/datawarehouse_api.rb +290 -0
- data/lib/ultracart_api/models/custom_dashboard_schedule.rb +258 -0
- data/lib/ultracart_api/models/{chargeback_dispute_response.rb → custom_dashboard_schedule_response.rb} +13 -13
- data/lib/ultracart_api/models/{chargeback_disputes_response.rb → custom_dashboard_schedules_response.rb} +16 -15
- data/lib/ultracart_api/models/custom_report.rb +10 -1
- data/lib/ultracart_api/models/email_campaign.rb +21 -1
- data/lib/ultracart_api/models/order_payment.rb +2 -2
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +3 -4
- metadata +8 -10
- data/docs/ChargebackApi.md +0 -297
- data/docs/ChargebackDispute.md +0 -62
- data/lib/ultracart_api/api/chargeback_api.rb +0 -410
- data/lib/ultracart_api/models/chargeback_dispute.rb +0 -649
@@ -1,649 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#UltraCart Rest API V2
|
3
|
-
|
4
|
-
#UltraCart REST API Version 2
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 2.0.0
|
7
|
-
Contact: support@ultracart.com
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
require 'time'
|
15
|
-
|
16
|
-
module UltracartClient
|
17
|
-
class ChargebackDispute
|
18
|
-
# Account number
|
19
|
-
attr_accessor :account_number
|
20
|
-
|
21
|
-
# Adjustment request text
|
22
|
-
attr_accessor :adjustment_request_text
|
23
|
-
|
24
|
-
# Amount
|
25
|
-
attr_accessor :amount
|
26
|
-
|
27
|
-
# Auth code
|
28
|
-
attr_accessor :auth_code
|
29
|
-
|
30
|
-
# Case number
|
31
|
-
attr_accessor :case_number
|
32
|
-
|
33
|
-
# Chargeback Dispute Oid
|
34
|
-
attr_accessor :chargeback_dispute_oid
|
35
|
-
|
36
|
-
# Chargeback dts
|
37
|
-
attr_accessor :chargeback_dts
|
38
|
-
|
39
|
-
# Currency
|
40
|
-
attr_accessor :currency
|
41
|
-
|
42
|
-
# Customer care notes
|
43
|
-
attr_accessor :customer_care_notes
|
44
|
-
|
45
|
-
# Encryption key
|
46
|
-
attr_accessor :encryption_key
|
47
|
-
|
48
|
-
# Expiration Dts
|
49
|
-
attr_accessor :expiration_dts
|
50
|
-
|
51
|
-
# Fax failure reason
|
52
|
-
attr_accessor :fax_failure_reason
|
53
|
-
|
54
|
-
# Fax number
|
55
|
-
attr_accessor :fax_number
|
56
|
-
|
57
|
-
# Fax transaction id
|
58
|
-
attr_accessor :fax_transaction_id
|
59
|
-
|
60
|
-
# icsid
|
61
|
-
attr_accessor :icsid
|
62
|
-
|
63
|
-
# Merchant account profile oid
|
64
|
-
attr_accessor :merchant_account_profile_oid
|
65
|
-
|
66
|
-
attr_accessor :order
|
67
|
-
|
68
|
-
# Order Id
|
69
|
-
attr_accessor :order_id
|
70
|
-
|
71
|
-
# Partial card number
|
72
|
-
attr_accessor :partial_card_number
|
73
|
-
|
74
|
-
# PDF file oid
|
75
|
-
attr_accessor :pdf_file_oid
|
76
|
-
|
77
|
-
# Reason code
|
78
|
-
attr_accessor :reason_code
|
79
|
-
|
80
|
-
# Status
|
81
|
-
attr_accessor :status
|
82
|
-
|
83
|
-
# Website URL
|
84
|
-
attr_accessor :website_url
|
85
|
-
|
86
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
87
|
-
def self.attribute_map
|
88
|
-
{
|
89
|
-
:'account_number' => :'account_number',
|
90
|
-
:'adjustment_request_text' => :'adjustment_request_text',
|
91
|
-
:'amount' => :'amount',
|
92
|
-
:'auth_code' => :'auth_code',
|
93
|
-
:'case_number' => :'case_number',
|
94
|
-
:'chargeback_dispute_oid' => :'chargeback_dispute_oid',
|
95
|
-
:'chargeback_dts' => :'chargeback_dts',
|
96
|
-
:'currency' => :'currency',
|
97
|
-
:'customer_care_notes' => :'customer_care_notes',
|
98
|
-
:'encryption_key' => :'encryption_key',
|
99
|
-
:'expiration_dts' => :'expiration_dts',
|
100
|
-
:'fax_failure_reason' => :'fax_failure_reason',
|
101
|
-
:'fax_number' => :'fax_number',
|
102
|
-
:'fax_transaction_id' => :'fax_transaction_id',
|
103
|
-
:'icsid' => :'icsid',
|
104
|
-
:'merchant_account_profile_oid' => :'merchant_account_profile_oid',
|
105
|
-
:'order' => :'order',
|
106
|
-
:'order_id' => :'order_id',
|
107
|
-
:'partial_card_number' => :'partial_card_number',
|
108
|
-
:'pdf_file_oid' => :'pdf_file_oid',
|
109
|
-
:'reason_code' => :'reason_code',
|
110
|
-
:'status' => :'status',
|
111
|
-
:'website_url' => :'website_url'
|
112
|
-
}
|
113
|
-
end
|
114
|
-
|
115
|
-
# Returns all the JSON keys this model knows about
|
116
|
-
def self.acceptable_attributes
|
117
|
-
attribute_map.values
|
118
|
-
end
|
119
|
-
|
120
|
-
# Attribute type mapping.
|
121
|
-
def self.openapi_types
|
122
|
-
{
|
123
|
-
:'account_number' => :'String',
|
124
|
-
:'adjustment_request_text' => :'String',
|
125
|
-
:'amount' => :'Float',
|
126
|
-
:'auth_code' => :'String',
|
127
|
-
:'case_number' => :'String',
|
128
|
-
:'chargeback_dispute_oid' => :'Integer',
|
129
|
-
:'chargeback_dts' => :'String',
|
130
|
-
:'currency' => :'String',
|
131
|
-
:'customer_care_notes' => :'String',
|
132
|
-
:'encryption_key' => :'String',
|
133
|
-
:'expiration_dts' => :'String',
|
134
|
-
:'fax_failure_reason' => :'String',
|
135
|
-
:'fax_number' => :'String',
|
136
|
-
:'fax_transaction_id' => :'Integer',
|
137
|
-
:'icsid' => :'String',
|
138
|
-
:'merchant_account_profile_oid' => :'Integer',
|
139
|
-
:'order' => :'Order',
|
140
|
-
:'order_id' => :'String',
|
141
|
-
:'partial_card_number' => :'String',
|
142
|
-
:'pdf_file_oid' => :'String',
|
143
|
-
:'reason_code' => :'String',
|
144
|
-
:'status' => :'String',
|
145
|
-
:'website_url' => :'String'
|
146
|
-
}
|
147
|
-
end
|
148
|
-
|
149
|
-
# List of attributes with nullable: true
|
150
|
-
def self.openapi_nullable
|
151
|
-
Set.new([
|
152
|
-
])
|
153
|
-
end
|
154
|
-
|
155
|
-
# Initializes the object
|
156
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
157
|
-
def initialize(attributes = {})
|
158
|
-
if (!attributes.is_a?(Hash))
|
159
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ChargebackDispute` initialize method"
|
160
|
-
end
|
161
|
-
|
162
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
163
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
164
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
165
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ChargebackDispute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
166
|
-
end
|
167
|
-
h[k.to_sym] = v
|
168
|
-
}
|
169
|
-
|
170
|
-
if attributes.key?(:'account_number')
|
171
|
-
self.account_number = attributes[:'account_number']
|
172
|
-
end
|
173
|
-
|
174
|
-
if attributes.key?(:'adjustment_request_text')
|
175
|
-
self.adjustment_request_text = attributes[:'adjustment_request_text']
|
176
|
-
end
|
177
|
-
|
178
|
-
if attributes.key?(:'amount')
|
179
|
-
self.amount = attributes[:'amount']
|
180
|
-
end
|
181
|
-
|
182
|
-
if attributes.key?(:'auth_code')
|
183
|
-
self.auth_code = attributes[:'auth_code']
|
184
|
-
end
|
185
|
-
|
186
|
-
if attributes.key?(:'case_number')
|
187
|
-
self.case_number = attributes[:'case_number']
|
188
|
-
end
|
189
|
-
|
190
|
-
if attributes.key?(:'chargeback_dispute_oid')
|
191
|
-
self.chargeback_dispute_oid = attributes[:'chargeback_dispute_oid']
|
192
|
-
end
|
193
|
-
|
194
|
-
if attributes.key?(:'chargeback_dts')
|
195
|
-
self.chargeback_dts = attributes[:'chargeback_dts']
|
196
|
-
end
|
197
|
-
|
198
|
-
if attributes.key?(:'currency')
|
199
|
-
self.currency = attributes[:'currency']
|
200
|
-
end
|
201
|
-
|
202
|
-
if attributes.key?(:'customer_care_notes')
|
203
|
-
self.customer_care_notes = attributes[:'customer_care_notes']
|
204
|
-
end
|
205
|
-
|
206
|
-
if attributes.key?(:'encryption_key')
|
207
|
-
self.encryption_key = attributes[:'encryption_key']
|
208
|
-
end
|
209
|
-
|
210
|
-
if attributes.key?(:'expiration_dts')
|
211
|
-
self.expiration_dts = attributes[:'expiration_dts']
|
212
|
-
end
|
213
|
-
|
214
|
-
if attributes.key?(:'fax_failure_reason')
|
215
|
-
self.fax_failure_reason = attributes[:'fax_failure_reason']
|
216
|
-
end
|
217
|
-
|
218
|
-
if attributes.key?(:'fax_number')
|
219
|
-
self.fax_number = attributes[:'fax_number']
|
220
|
-
end
|
221
|
-
|
222
|
-
if attributes.key?(:'fax_transaction_id')
|
223
|
-
self.fax_transaction_id = attributes[:'fax_transaction_id']
|
224
|
-
end
|
225
|
-
|
226
|
-
if attributes.key?(:'icsid')
|
227
|
-
self.icsid = attributes[:'icsid']
|
228
|
-
end
|
229
|
-
|
230
|
-
if attributes.key?(:'merchant_account_profile_oid')
|
231
|
-
self.merchant_account_profile_oid = attributes[:'merchant_account_profile_oid']
|
232
|
-
end
|
233
|
-
|
234
|
-
if attributes.key?(:'order')
|
235
|
-
self.order = attributes[:'order']
|
236
|
-
end
|
237
|
-
|
238
|
-
if attributes.key?(:'order_id')
|
239
|
-
self.order_id = attributes[:'order_id']
|
240
|
-
end
|
241
|
-
|
242
|
-
if attributes.key?(:'partial_card_number')
|
243
|
-
self.partial_card_number = attributes[:'partial_card_number']
|
244
|
-
end
|
245
|
-
|
246
|
-
if attributes.key?(:'pdf_file_oid')
|
247
|
-
self.pdf_file_oid = attributes[:'pdf_file_oid']
|
248
|
-
end
|
249
|
-
|
250
|
-
if attributes.key?(:'reason_code')
|
251
|
-
self.reason_code = attributes[:'reason_code']
|
252
|
-
end
|
253
|
-
|
254
|
-
if attributes.key?(:'status')
|
255
|
-
self.status = attributes[:'status']
|
256
|
-
end
|
257
|
-
|
258
|
-
if attributes.key?(:'website_url')
|
259
|
-
self.website_url = attributes[:'website_url']
|
260
|
-
end
|
261
|
-
end
|
262
|
-
|
263
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
264
|
-
# @return Array for valid properties with the reasons
|
265
|
-
def list_invalid_properties
|
266
|
-
invalid_properties = Array.new
|
267
|
-
if !@account_number.nil? && @account_number.to_s.length > 50
|
268
|
-
invalid_properties.push('invalid value for "account_number", the character length must be smaller than or equal to 50.')
|
269
|
-
end
|
270
|
-
|
271
|
-
if !@auth_code.nil? && @auth_code.to_s.length > 20
|
272
|
-
invalid_properties.push('invalid value for "auth_code", the character length must be smaller than or equal to 20.')
|
273
|
-
end
|
274
|
-
|
275
|
-
if !@case_number.nil? && @case_number.to_s.length > 50
|
276
|
-
invalid_properties.push('invalid value for "case_number", the character length must be smaller than or equal to 50.')
|
277
|
-
end
|
278
|
-
|
279
|
-
if !@currency.nil? && @currency.to_s.length > 10
|
280
|
-
invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 10.')
|
281
|
-
end
|
282
|
-
|
283
|
-
if !@encryption_key.nil? && @encryption_key.to_s.length > 100
|
284
|
-
invalid_properties.push('invalid value for "encryption_key", the character length must be smaller than or equal to 100.')
|
285
|
-
end
|
286
|
-
|
287
|
-
if !@fax_failure_reason.nil? && @fax_failure_reason.to_s.length > 250
|
288
|
-
invalid_properties.push('invalid value for "fax_failure_reason", the character length must be smaller than or equal to 250.')
|
289
|
-
end
|
290
|
-
|
291
|
-
if !@fax_number.nil? && @fax_number.to_s.length > 20
|
292
|
-
invalid_properties.push('invalid value for "fax_number", the character length must be smaller than or equal to 20.')
|
293
|
-
end
|
294
|
-
|
295
|
-
if !@icsid.nil? && @icsid.to_s.length > 50
|
296
|
-
invalid_properties.push('invalid value for "icsid", the character length must be smaller than or equal to 50.')
|
297
|
-
end
|
298
|
-
|
299
|
-
if !@order_id.nil? && @order_id.to_s.length > 30
|
300
|
-
invalid_properties.push('invalid value for "order_id", the character length must be smaller than or equal to 30.')
|
301
|
-
end
|
302
|
-
|
303
|
-
if !@partial_card_number.nil? && @partial_card_number.to_s.length > 20
|
304
|
-
invalid_properties.push('invalid value for "partial_card_number", the character length must be smaller than or equal to 20.')
|
305
|
-
end
|
306
|
-
|
307
|
-
if !@pdf_file_oid.nil? && @pdf_file_oid.to_s.length > 32
|
308
|
-
invalid_properties.push('invalid value for "pdf_file_oid", the character length must be smaller than or equal to 32.')
|
309
|
-
end
|
310
|
-
|
311
|
-
if !@reason_code.nil? && @reason_code.to_s.length > 70
|
312
|
-
invalid_properties.push('invalid value for "reason_code", the character length must be smaller than or equal to 70.')
|
313
|
-
end
|
314
|
-
|
315
|
-
if !@status.nil? && @status.to_s.length > 20
|
316
|
-
invalid_properties.push('invalid value for "status", the character length must be smaller than or equal to 20.')
|
317
|
-
end
|
318
|
-
|
319
|
-
if !@website_url.nil? && @website_url.to_s.length > 250
|
320
|
-
invalid_properties.push('invalid value for "website_url", the character length must be smaller than or equal to 250.')
|
321
|
-
end
|
322
|
-
|
323
|
-
invalid_properties
|
324
|
-
end
|
325
|
-
|
326
|
-
# Check to see if the all the properties in the model are valid
|
327
|
-
# @return true if the model is valid
|
328
|
-
def valid?
|
329
|
-
return false if !@account_number.nil? && @account_number.to_s.length > 50
|
330
|
-
return false if !@auth_code.nil? && @auth_code.to_s.length > 20
|
331
|
-
return false if !@case_number.nil? && @case_number.to_s.length > 50
|
332
|
-
return false if !@currency.nil? && @currency.to_s.length > 10
|
333
|
-
return false if !@encryption_key.nil? && @encryption_key.to_s.length > 100
|
334
|
-
return false if !@fax_failure_reason.nil? && @fax_failure_reason.to_s.length > 250
|
335
|
-
return false if !@fax_number.nil? && @fax_number.to_s.length > 20
|
336
|
-
return false if !@icsid.nil? && @icsid.to_s.length > 50
|
337
|
-
return false if !@order_id.nil? && @order_id.to_s.length > 30
|
338
|
-
return false if !@partial_card_number.nil? && @partial_card_number.to_s.length > 20
|
339
|
-
return false if !@pdf_file_oid.nil? && @pdf_file_oid.to_s.length > 32
|
340
|
-
return false if !@reason_code.nil? && @reason_code.to_s.length > 70
|
341
|
-
return false if !@status.nil? && @status.to_s.length > 20
|
342
|
-
return false if !@website_url.nil? && @website_url.to_s.length > 250
|
343
|
-
true
|
344
|
-
end
|
345
|
-
|
346
|
-
# Custom attribute writer method with validation
|
347
|
-
# @param [Object] account_number Value to be assigned
|
348
|
-
def account_number=(account_number)
|
349
|
-
if !account_number.nil? && account_number.to_s.length > 50
|
350
|
-
fail ArgumentError, 'invalid value for "account_number", the character length must be smaller than or equal to 50.'
|
351
|
-
end
|
352
|
-
|
353
|
-
@account_number = account_number
|
354
|
-
end
|
355
|
-
|
356
|
-
# Custom attribute writer method with validation
|
357
|
-
# @param [Object] auth_code Value to be assigned
|
358
|
-
def auth_code=(auth_code)
|
359
|
-
if !auth_code.nil? && auth_code.to_s.length > 20
|
360
|
-
fail ArgumentError, 'invalid value for "auth_code", the character length must be smaller than or equal to 20.'
|
361
|
-
end
|
362
|
-
|
363
|
-
@auth_code = auth_code
|
364
|
-
end
|
365
|
-
|
366
|
-
# Custom attribute writer method with validation
|
367
|
-
# @param [Object] case_number Value to be assigned
|
368
|
-
def case_number=(case_number)
|
369
|
-
if !case_number.nil? && case_number.to_s.length > 50
|
370
|
-
fail ArgumentError, 'invalid value for "case_number", the character length must be smaller than or equal to 50.'
|
371
|
-
end
|
372
|
-
|
373
|
-
@case_number = case_number
|
374
|
-
end
|
375
|
-
|
376
|
-
# Custom attribute writer method with validation
|
377
|
-
# @param [Object] currency Value to be assigned
|
378
|
-
def currency=(currency)
|
379
|
-
if !currency.nil? && currency.to_s.length > 10
|
380
|
-
fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 10.'
|
381
|
-
end
|
382
|
-
|
383
|
-
@currency = currency
|
384
|
-
end
|
385
|
-
|
386
|
-
# Custom attribute writer method with validation
|
387
|
-
# @param [Object] encryption_key Value to be assigned
|
388
|
-
def encryption_key=(encryption_key)
|
389
|
-
if !encryption_key.nil? && encryption_key.to_s.length > 100
|
390
|
-
fail ArgumentError, 'invalid value for "encryption_key", the character length must be smaller than or equal to 100.'
|
391
|
-
end
|
392
|
-
|
393
|
-
@encryption_key = encryption_key
|
394
|
-
end
|
395
|
-
|
396
|
-
# Custom attribute writer method with validation
|
397
|
-
# @param [Object] fax_failure_reason Value to be assigned
|
398
|
-
def fax_failure_reason=(fax_failure_reason)
|
399
|
-
if !fax_failure_reason.nil? && fax_failure_reason.to_s.length > 250
|
400
|
-
fail ArgumentError, 'invalid value for "fax_failure_reason", the character length must be smaller than or equal to 250.'
|
401
|
-
end
|
402
|
-
|
403
|
-
@fax_failure_reason = fax_failure_reason
|
404
|
-
end
|
405
|
-
|
406
|
-
# Custom attribute writer method with validation
|
407
|
-
# @param [Object] fax_number Value to be assigned
|
408
|
-
def fax_number=(fax_number)
|
409
|
-
if !fax_number.nil? && fax_number.to_s.length > 20
|
410
|
-
fail ArgumentError, 'invalid value for "fax_number", the character length must be smaller than or equal to 20.'
|
411
|
-
end
|
412
|
-
|
413
|
-
@fax_number = fax_number
|
414
|
-
end
|
415
|
-
|
416
|
-
# Custom attribute writer method with validation
|
417
|
-
# @param [Object] icsid Value to be assigned
|
418
|
-
def icsid=(icsid)
|
419
|
-
if !icsid.nil? && icsid.to_s.length > 50
|
420
|
-
fail ArgumentError, 'invalid value for "icsid", the character length must be smaller than or equal to 50.'
|
421
|
-
end
|
422
|
-
|
423
|
-
@icsid = icsid
|
424
|
-
end
|
425
|
-
|
426
|
-
# Custom attribute writer method with validation
|
427
|
-
# @param [Object] order_id Value to be assigned
|
428
|
-
def order_id=(order_id)
|
429
|
-
if !order_id.nil? && order_id.to_s.length > 30
|
430
|
-
fail ArgumentError, 'invalid value for "order_id", the character length must be smaller than or equal to 30.'
|
431
|
-
end
|
432
|
-
|
433
|
-
@order_id = order_id
|
434
|
-
end
|
435
|
-
|
436
|
-
# Custom attribute writer method with validation
|
437
|
-
# @param [Object] partial_card_number Value to be assigned
|
438
|
-
def partial_card_number=(partial_card_number)
|
439
|
-
if !partial_card_number.nil? && partial_card_number.to_s.length > 20
|
440
|
-
fail ArgumentError, 'invalid value for "partial_card_number", the character length must be smaller than or equal to 20.'
|
441
|
-
end
|
442
|
-
|
443
|
-
@partial_card_number = partial_card_number
|
444
|
-
end
|
445
|
-
|
446
|
-
# Custom attribute writer method with validation
|
447
|
-
# @param [Object] pdf_file_oid Value to be assigned
|
448
|
-
def pdf_file_oid=(pdf_file_oid)
|
449
|
-
if !pdf_file_oid.nil? && pdf_file_oid.to_s.length > 32
|
450
|
-
fail ArgumentError, 'invalid value for "pdf_file_oid", the character length must be smaller than or equal to 32.'
|
451
|
-
end
|
452
|
-
|
453
|
-
@pdf_file_oid = pdf_file_oid
|
454
|
-
end
|
455
|
-
|
456
|
-
# Custom attribute writer method with validation
|
457
|
-
# @param [Object] reason_code Value to be assigned
|
458
|
-
def reason_code=(reason_code)
|
459
|
-
if !reason_code.nil? && reason_code.to_s.length > 70
|
460
|
-
fail ArgumentError, 'invalid value for "reason_code", the character length must be smaller than or equal to 70.'
|
461
|
-
end
|
462
|
-
|
463
|
-
@reason_code = reason_code
|
464
|
-
end
|
465
|
-
|
466
|
-
# Custom attribute writer method with validation
|
467
|
-
# @param [Object] status Value to be assigned
|
468
|
-
def status=(status)
|
469
|
-
if !status.nil? && status.to_s.length > 20
|
470
|
-
fail ArgumentError, 'invalid value for "status", the character length must be smaller than or equal to 20.'
|
471
|
-
end
|
472
|
-
|
473
|
-
@status = status
|
474
|
-
end
|
475
|
-
|
476
|
-
# Custom attribute writer method with validation
|
477
|
-
# @param [Object] website_url Value to be assigned
|
478
|
-
def website_url=(website_url)
|
479
|
-
if !website_url.nil? && website_url.to_s.length > 250
|
480
|
-
fail ArgumentError, 'invalid value for "website_url", the character length must be smaller than or equal to 250.'
|
481
|
-
end
|
482
|
-
|
483
|
-
@website_url = website_url
|
484
|
-
end
|
485
|
-
|
486
|
-
# Checks equality by comparing each attribute.
|
487
|
-
# @param [Object] Object to be compared
|
488
|
-
def ==(o)
|
489
|
-
return true if self.equal?(o)
|
490
|
-
self.class == o.class &&
|
491
|
-
account_number == o.account_number &&
|
492
|
-
adjustment_request_text == o.adjustment_request_text &&
|
493
|
-
amount == o.amount &&
|
494
|
-
auth_code == o.auth_code &&
|
495
|
-
case_number == o.case_number &&
|
496
|
-
chargeback_dispute_oid == o.chargeback_dispute_oid &&
|
497
|
-
chargeback_dts == o.chargeback_dts &&
|
498
|
-
currency == o.currency &&
|
499
|
-
customer_care_notes == o.customer_care_notes &&
|
500
|
-
encryption_key == o.encryption_key &&
|
501
|
-
expiration_dts == o.expiration_dts &&
|
502
|
-
fax_failure_reason == o.fax_failure_reason &&
|
503
|
-
fax_number == o.fax_number &&
|
504
|
-
fax_transaction_id == o.fax_transaction_id &&
|
505
|
-
icsid == o.icsid &&
|
506
|
-
merchant_account_profile_oid == o.merchant_account_profile_oid &&
|
507
|
-
order == o.order &&
|
508
|
-
order_id == o.order_id &&
|
509
|
-
partial_card_number == o.partial_card_number &&
|
510
|
-
pdf_file_oid == o.pdf_file_oid &&
|
511
|
-
reason_code == o.reason_code &&
|
512
|
-
status == o.status &&
|
513
|
-
website_url == o.website_url
|
514
|
-
end
|
515
|
-
|
516
|
-
# @see the `==` method
|
517
|
-
# @param [Object] Object to be compared
|
518
|
-
def eql?(o)
|
519
|
-
self == o
|
520
|
-
end
|
521
|
-
|
522
|
-
# Calculates hash code according to all attributes.
|
523
|
-
# @return [Integer] Hash code
|
524
|
-
def hash
|
525
|
-
[account_number, adjustment_request_text, amount, auth_code, case_number, chargeback_dispute_oid, chargeback_dts, currency, customer_care_notes, encryption_key, expiration_dts, fax_failure_reason, fax_number, fax_transaction_id, icsid, merchant_account_profile_oid, order, order_id, partial_card_number, pdf_file_oid, reason_code, status, website_url].hash
|
526
|
-
end
|
527
|
-
|
528
|
-
# Builds the object from hash
|
529
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
530
|
-
# @return [Object] Returns the model itself
|
531
|
-
def self.build_from_hash(attributes)
|
532
|
-
new.build_from_hash(attributes)
|
533
|
-
end
|
534
|
-
|
535
|
-
# Builds the object from hash
|
536
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
537
|
-
# @return [Object] Returns the model itself
|
538
|
-
def build_from_hash(attributes)
|
539
|
-
return nil unless attributes.is_a?(Hash)
|
540
|
-
attributes = attributes.transform_keys(&:to_sym)
|
541
|
-
self.class.openapi_types.each_pair do |key, type|
|
542
|
-
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
543
|
-
self.send("#{key}=", nil)
|
544
|
-
elsif type =~ /\AArray<(.*)>/i
|
545
|
-
# check to ensure the input is an array given that the attribute
|
546
|
-
# is documented as an array but the input is not
|
547
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
548
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
549
|
-
end
|
550
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
551
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
552
|
-
end
|
553
|
-
end
|
554
|
-
|
555
|
-
self
|
556
|
-
end
|
557
|
-
|
558
|
-
# Deserializes the data based on type
|
559
|
-
# @param string type Data type
|
560
|
-
# @param string value Value to be deserialized
|
561
|
-
# @return [Object] Deserialized data
|
562
|
-
def _deserialize(type, value)
|
563
|
-
case type.to_sym
|
564
|
-
when :Time
|
565
|
-
Time.parse(value)
|
566
|
-
when :Date
|
567
|
-
Date.parse(value)
|
568
|
-
when :String
|
569
|
-
value.to_s
|
570
|
-
when :Integer
|
571
|
-
value.to_i
|
572
|
-
when :Float
|
573
|
-
value.to_f
|
574
|
-
when :Boolean
|
575
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
576
|
-
true
|
577
|
-
else
|
578
|
-
false
|
579
|
-
end
|
580
|
-
when :Object
|
581
|
-
# generic object (usually a Hash), return directly
|
582
|
-
value
|
583
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
584
|
-
inner_type = Regexp.last_match[:inner_type]
|
585
|
-
value.map { |v| _deserialize(inner_type, v) }
|
586
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
587
|
-
k_type = Regexp.last_match[:k_type]
|
588
|
-
v_type = Regexp.last_match[:v_type]
|
589
|
-
{}.tap do |hash|
|
590
|
-
value.each do |k, v|
|
591
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
592
|
-
end
|
593
|
-
end
|
594
|
-
else # model
|
595
|
-
# models (e.g. Pet) or oneOf
|
596
|
-
klass = UltracartClient.const_get(type)
|
597
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
598
|
-
end
|
599
|
-
end
|
600
|
-
|
601
|
-
# Returns the string representation of the object
|
602
|
-
# @return [String] String presentation of the object
|
603
|
-
def to_s
|
604
|
-
to_hash.to_s
|
605
|
-
end
|
606
|
-
|
607
|
-
# to_body is an alias to to_hash (backward compatibility)
|
608
|
-
# @return [Hash] Returns the object in the form of hash
|
609
|
-
def to_body
|
610
|
-
to_hash
|
611
|
-
end
|
612
|
-
|
613
|
-
# Returns the object in the form of hash
|
614
|
-
# @return [Hash] Returns the object in the form of hash
|
615
|
-
def to_hash
|
616
|
-
hash = {}
|
617
|
-
self.class.attribute_map.each_pair do |attr, param|
|
618
|
-
value = self.send(attr)
|
619
|
-
if value.nil?
|
620
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
621
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
622
|
-
end
|
623
|
-
|
624
|
-
hash[param] = _to_hash(value)
|
625
|
-
end
|
626
|
-
hash
|
627
|
-
end
|
628
|
-
|
629
|
-
# Outputs non-array value in the form of hash
|
630
|
-
# For object, use to_hash. Otherwise, just return the value
|
631
|
-
# @param [Object] value Any valid value
|
632
|
-
# @return [Hash] Returns the value in the form of hash
|
633
|
-
def _to_hash(value)
|
634
|
-
if value.is_a?(Array)
|
635
|
-
value.compact.map { |v| _to_hash(v) }
|
636
|
-
elsif value.is_a?(Hash)
|
637
|
-
{}.tap do |hash|
|
638
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
639
|
-
end
|
640
|
-
elsif value.respond_to? :to_hash
|
641
|
-
value.to_hash
|
642
|
-
else
|
643
|
-
value
|
644
|
-
end
|
645
|
-
end
|
646
|
-
|
647
|
-
end
|
648
|
-
|
649
|
-
end
|