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