Class: DnaPaymentsPartnerReportingSettlementApIs::EcommerceTransaction

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb

Overview

EcommerceTransaction Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(id: SKIP, merchant_id: SKIP, merchant_name: SKIP, merchant_reference: SKIP, amount: SKIP, currency: SKIP, created_date: SKIP, auth_date: SKIP, confirm_date: SKIP, processed_date: SKIP, processed_amount: SKIP, type: SKIP, status: SKIP, payment_method: SKIP, card_type: SKIP, card_scheme: SKIP, card_mask: SKIP, issuer: SKIP, issuer_country: SKIP, response_code: SKIP, auth_code: SKIP, avs_result: SKIP, avs_house_number_result: SKIP, avs_postcode_result: SKIP, csc_result: SKIP, payer_authentication_result: SKIP, payer_ip: SKIP, payer_name: SKIP, payer_email: SKIP, payer_phone: SKIP, ip_country: SKIP, ip_city: SKIP, ip_latitude: SKIP, ip_longitude: SKIP, merchant_custom_data: SKIP, description: SKIP, parent_transaction_id: SKIP, additional_properties: nil) ⇒ EcommerceTransaction

Returns a new instance of EcommerceTransaction.



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 292

def initialize(id: SKIP, merchant_id: SKIP, merchant_name: SKIP,
               merchant_reference: SKIP, amount: SKIP, currency: SKIP,
               created_date: SKIP, auth_date: SKIP, confirm_date: SKIP,
               processed_date: SKIP, processed_amount: SKIP, type: SKIP,
               status: SKIP, payment_method: SKIP, card_type: SKIP,
               card_scheme: SKIP, card_mask: SKIP, issuer: SKIP,
               issuer_country: SKIP, response_code: SKIP, auth_code: SKIP,
               avs_result: SKIP, avs_house_number_result: SKIP,
               avs_postcode_result: SKIP, csc_result: SKIP,
               payer_authentication_result: SKIP, payer_ip: SKIP,
               payer_name: SKIP, payer_email: SKIP, payer_phone: SKIP,
               ip_country: SKIP, ip_city: SKIP, ip_latitude: SKIP,
               ip_longitude: SKIP, merchant_custom_data: SKIP,
               description: SKIP, parent_transaction_id: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @id = id unless id == SKIP
  @merchant_id = merchant_id unless merchant_id == SKIP
  @merchant_name = merchant_name unless merchant_name == SKIP
  @merchant_reference = merchant_reference unless merchant_reference == SKIP
  @amount = amount unless amount == SKIP
  @currency = currency unless currency == SKIP
  @created_date = created_date unless created_date == SKIP
  @auth_date = auth_date unless auth_date == SKIP
  @confirm_date = confirm_date unless confirm_date == SKIP
  @processed_date = processed_date unless processed_date == SKIP
  @processed_amount = processed_amount unless processed_amount == SKIP
  @type = type unless type == SKIP
  @status = status unless status == SKIP
  @payment_method = payment_method unless payment_method == SKIP
  @card_type = card_type unless card_type == SKIP
  @card_scheme = card_scheme unless card_scheme == SKIP
  @card_mask = card_mask unless card_mask == SKIP
  @issuer = issuer unless issuer == SKIP
  @issuer_country = issuer_country unless issuer_country == SKIP
  @response_code = response_code unless response_code == SKIP
  @auth_code = auth_code unless auth_code == SKIP
  @avs_result = avs_result unless avs_result == SKIP
  @avs_house_number_result = avs_house_number_result unless avs_house_number_result == SKIP
  @avs_postcode_result = avs_postcode_result unless avs_postcode_result == SKIP
  @csc_result = csc_result unless csc_result == SKIP
  unless payer_authentication_result == SKIP
    @payer_authentication_result =
      payer_authentication_result
  end
  @payer_ip = payer_ip unless payer_ip == SKIP
  @payer_name = payer_name unless payer_name == SKIP
  @payer_email = payer_email unless payer_email == SKIP
  @payer_phone = payer_phone unless payer_phone == SKIP
  @ip_country = ip_country unless ip_country == SKIP
  @ip_city = ip_city unless ip_city == SKIP
  @ip_latitude = ip_latitude unless ip_latitude == SKIP
  @ip_longitude = ip_longitude unless ip_longitude == SKIP
  @merchant_custom_data = merchant_custom_data unless merchant_custom_data == SKIP
  @description = description unless description == SKIP
  @parent_transaction_id = parent_transaction_id unless parent_transaction_id == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#amountFloat

Original requested transaction amount.

Returns:

  • (Float)


31
32
33
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 31

def amount
  @amount
end

#auth_codeString

Authorisation code issued by the acquirer/issuer for the transaction, when applicable.

Returns:

  • (String)


101
102
103
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 101

def auth_code
  @auth_code
end

#auth_dateDateTime

Date/time the transaction authorisation was attempted with the acquirer.

Returns:

  • (DateTime)


43
44
45
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 43

def auth_date
  @auth_date
end

#avs_house_number_resultString

Result of the AVS 'House Number' check.

Returns:

  • (String)


109
110
111
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 109

def avs_house_number_result
  @avs_house_number_result
end

#avs_postcode_resultString

Result of the AVS 'Post Code' check.

Returns:

  • (String)


113
114
115
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 113

def avs_postcode_result
  @avs_postcode_result
end

#avs_resultString

Result of the Address Verification System (AVS) check.

Returns:

  • (String)


105
106
107
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 105

def avs_result
  @avs_result
end

#card_maskString

Masked PAN for the payment card used; contains the first six and last four digits.

Returns:

  • (String)


84
85
86
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 84

def card_mask
  @card_mask
end

#card_schemeString

Card scheme used in the transaction, e.g. mastercard, visa.

Returns:

  • (String)


79
80
81
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 79

def card_scheme
  @card_scheme
end

#card_typeString

Type of card used in the transaction.

Returns:

  • (String)


75
76
77
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 75

def card_type
  @card_type
end

#confirm_dateDateTime

Date/time the transaction was confirmed on the DNA Platform.

Returns:

  • (DateTime)


47
48
49
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 47

def confirm_date
  @confirm_date
end

#created_dateDateTime

Date/time the transaction was created on the DNA Platform.

Returns:

  • (DateTime)


39
40
41
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 39

def created_date
  @created_date
end

#csc_resultString

Result of the Cardholder Security Code (CSC) check.

Returns:

  • (String)


117
118
119
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 117

def csc_result
  @csc_result
end

#currencyString

Transaction currency code. ISO 4217 format, e.g. GBP.

Returns:

  • (String)


35
36
37
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 35

def currency
  @currency
end

#descriptionString

Descriptive text passed in the Payment Request for the transaction.

Returns:

  • (String)


167
168
169
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 167

def description
  @description
end

#idString

Unique transaction ID.

Returns:

  • (String)


15
16
17
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 15

def id
  @id
end

#ip_cityString

City where the purchase was made. Subject to GDPR confirmation; may be removed.

Returns:

  • (String)


150
151
152
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 150

def ip_city
  @ip_city
end

#ip_countryString

Country where the purchase was made. Subject to GDPR confirmation; may be removed.

Returns:

  • (String)


145
146
147
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 145

def ip_country
  @ip_country
end

#ip_latitudeFloat

Locational data – latitude. Subject to GDPR confirmation; may be removed.

Returns:

  • (Float)


154
155
156
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 154

def ip_latitude
  @ip_latitude
end

#ip_longitudeFloat

Locational data – longitude. Subject to GDPR confirmation; may be removed.

Returns:

  • (Float)


158
159
160
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 158

def ip_longitude
  @ip_longitude
end

#issuerString

Issuer of the payment card used in the transaction.

Returns:

  • (String)


88
89
90
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 88

def issuer
  @issuer
end

#issuer_countryString

Country in which the payment card was issued. ISO 3166-1 alpha-3.

Returns:

  • (String)


92
93
94
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 92

def issuer_country
  @issuer_country
end

#merchant_custom_dataString

Base64-encoded custom data supplied by the merchant with the transaction request. Max 1024 bytes. Not used for any processing, purely recorded.

Returns:

  • (String)


163
164
165
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 163

def merchant_custom_data
  @merchant_custom_data
end

#merchant_idString

Unique ID for the merchant, allocated by DNA Payments.

Returns:

  • (String)


19
20
21
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 19

def merchant_id
  @merchant_id
end

#merchant_nameString

Name of the merchant.

Returns:

  • (String)


23
24
25
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 23

def merchant_name
  @merchant_name
end

#merchant_referenceString

Unique order number allocated by the merchant.

Returns:

  • (String)


27
28
29
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 27

def merchant_reference
  @merchant_reference
end

#parent_transaction_idString

If the transaction is a full/partial refund, the transactionId of the original/linked sale.

Returns:

  • (String)


172
173
174
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 172

def parent_transaction_id
  @parent_transaction_id
end

#payer_authentication_resultString

Result of the Payer Authentication enrollment/authentication checks, format Enrollment/Authentication e.g. Y/A.

Returns:

  • (String)


122
123
124
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 122

def payer_authentication_result
  @payer_authentication_result
end

#payer_emailString

Email address of the consumer. Subject to GDPR confirmation; may be removed.

Returns:

  • (String)


135
136
137
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 135

def payer_email
  @payer_email
end

#payer_ipString

IP address of the consumer. Subject to GDPR confirmation; may be removed.

Returns:

  • (String)


126
127
128
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 126

def payer_ip
  @payer_ip
end

#payer_nameString

Consumer name. Subject to GDPR confirmation; may be removed.

Returns:

  • (String)


130
131
132
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 130

def payer_name
  @payer_name
end

#payer_phoneString

Phone number of the consumer. Subject to GDPR confirmation; may be removed.

Returns:

  • (String)


140
141
142
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 140

def payer_phone
  @payer_phone
end

#payment_methodString

Payment method used on the transaction. See the Ecommerce Reference documentation for the full list (not available at spec-generation time).

Returns:

  • (String)


71
72
73
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 71

def payment_method
  @payment_method
end

#processed_amountFloat

Charged/Settled/Refunded amount.

Returns:

  • (Float)


56
57
58
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 56

def processed_amount
  @processed_amount
end

#processed_dateDateTime

Date/time the transaction was processed (last action performed, e.g. charged/settled/refunded).

Returns:

  • (DateTime)


52
53
54
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 52

def processed_date
  @processed_date
end

#response_codeString

Response code returned by the acquirer during authorisation.

Returns:

  • (String)


96
97
98
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 96

def response_code
  @response_code
end

#statusString

Status of the transaction. See the Ecommerce Reference documentation for the full list (not available at spec-generation time).

Returns:

  • (String)


66
67
68
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 66

def status
  @status
end

#typeString

Transaction type. See the Ecommerce Reference documentation for the full list (not available at spec-generation time).

Returns:

  • (String)


61
62
63
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 61

def type
  @type
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 354

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  id = hash.key?('id') ? hash['id'] : SKIP
  merchant_id = hash.key?('merchantId') ? hash['merchantId'] : SKIP
  merchant_name = hash.key?('merchantName') ? hash['merchantName'] : SKIP
  merchant_reference =
    hash.key?('merchantReference') ? hash['merchantReference'] : SKIP
  amount = hash.key?('amount') ? hash['amount'] : SKIP
  currency = hash.key?('currency') ? hash['currency'] : SKIP
  created_date = if hash.key?('createdDate')
                   (DateTimeHelper.from_rfc3339(hash['createdDate']) if hash['createdDate'])
                 else
                   SKIP
                 end
  auth_date = if hash.key?('authDate')
                (DateTimeHelper.from_rfc3339(hash['authDate']) if hash['authDate'])
              else
                SKIP
              end
  confirm_date = if hash.key?('confirmDate')
                   (DateTimeHelper.from_rfc3339(hash['confirmDate']) if hash['confirmDate'])
                 else
                   SKIP
                 end
  processed_date = if hash.key?('processedDate')
                     (DateTimeHelper.from_rfc3339(hash['processedDate']) if hash['processedDate'])
                   else
                     SKIP
                   end
  processed_amount =
    hash.key?('processedAmount') ? hash['processedAmount'] : SKIP
  type = hash.key?('type') ? hash['type'] : SKIP
  status = hash.key?('status') ? hash['status'] : SKIP
  payment_method = hash.key?('paymentMethod') ? hash['paymentMethod'] : SKIP
  card_type = hash.key?('cardType') ? hash['cardType'] : SKIP
  card_scheme = hash.key?('cardScheme') ? hash['cardScheme'] : SKIP
  card_mask = hash.key?('cardMask') ? hash['cardMask'] : SKIP
  issuer = hash.key?('issuer') ? hash['issuer'] : SKIP
  issuer_country = hash.key?('issuerCountry') ? hash['issuerCountry'] : SKIP
  response_code = hash.key?('responseCode') ? hash['responseCode'] : SKIP
  auth_code = hash.key?('authCode') ? hash['authCode'] : SKIP
  avs_result = hash.key?('avsResult') ? hash['avsResult'] : SKIP
  avs_house_number_result =
    hash.key?('avsHouseNumberResult') ? hash['avsHouseNumberResult'] : SKIP
  avs_postcode_result =
    hash.key?('avsPostcodeResult') ? hash['avsPostcodeResult'] : SKIP
  csc_result = hash.key?('cscResult') ? hash['cscResult'] : SKIP
  payer_authentication_result =
    hash.key?('payerAuthenticationResult') ? hash['payerAuthenticationResult'] : SKIP
  payer_ip = hash.key?('payerIp') ? hash['payerIp'] : SKIP
  payer_name = hash.key?('payerName') ? hash['payerName'] : SKIP
  payer_email = hash.key?('payerEmail') ? hash['payerEmail'] : SKIP
  payer_phone = hash.key?('payerPhone') ? hash['payerPhone'] : SKIP
  ip_country = hash.key?('ipCountry') ? hash['ipCountry'] : SKIP
  ip_city = hash.key?('ipCity') ? hash['ipCity'] : SKIP
  ip_latitude = hash.key?('ipLatitude') ? hash['ipLatitude'] : SKIP
  ip_longitude = hash.key?('ipLongitude') ? hash['ipLongitude'] : SKIP
  merchant_custom_data =
    hash.key?('merchantCustomData') ? hash['merchantCustomData'] : SKIP
  description = hash.key?('description') ? hash['description'] : SKIP
  parent_transaction_id =
    hash.key?('parentTransactionId') ? hash['parentTransactionId'] : SKIP

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  EcommerceTransaction.new(id: id,
                           merchant_id: merchant_id,
                           merchant_name: merchant_name,
                           merchant_reference: merchant_reference,
                           amount: amount,
                           currency: currency,
                           created_date: created_date,
                           auth_date: auth_date,
                           confirm_date: confirm_date,
                           processed_date: processed_date,
                           processed_amount: processed_amount,
                           type: type,
                           status: status,
                           payment_method: payment_method,
                           card_type: card_type,
                           card_scheme: card_scheme,
                           card_mask: card_mask,
                           issuer: issuer,
                           issuer_country: issuer_country,
                           response_code: response_code,
                           auth_code: auth_code,
                           avs_result: avs_result,
                           avs_house_number_result: avs_house_number_result,
                           avs_postcode_result: avs_postcode_result,
                           csc_result: csc_result,
                           payer_authentication_result: payer_authentication_result,
                           payer_ip: payer_ip,
                           payer_name: payer_name,
                           payer_email: payer_email,
                           payer_phone: payer_phone,
                           ip_country: ip_country,
                           ip_city: ip_city,
                           ip_latitude: ip_latitude,
                           ip_longitude: ip_longitude,
                           merchant_custom_data: merchant_custom_data,
                           description: description,
                           parent_transaction_id: parent_transaction_id,
                           additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 175

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['id'] = 'id'
  @_hash['merchant_id'] = 'merchantId'
  @_hash['merchant_name'] = 'merchantName'
  @_hash['merchant_reference'] = 'merchantReference'
  @_hash['amount'] = 'amount'
  @_hash['currency'] = 'currency'
  @_hash['created_date'] = 'createdDate'
  @_hash['auth_date'] = 'authDate'
  @_hash['confirm_date'] = 'confirmDate'
  @_hash['processed_date'] = 'processedDate'
  @_hash['processed_amount'] = 'processedAmount'
  @_hash['type'] = 'type'
  @_hash['status'] = 'status'
  @_hash['payment_method'] = 'paymentMethod'
  @_hash['card_type'] = 'cardType'
  @_hash['card_scheme'] = 'cardScheme'
  @_hash['card_mask'] = 'cardMask'
  @_hash['issuer'] = 'issuer'
  @_hash['issuer_country'] = 'issuerCountry'
  @_hash['response_code'] = 'responseCode'
  @_hash['auth_code'] = 'authCode'
  @_hash['avs_result'] = 'avsResult'
  @_hash['avs_house_number_result'] = 'avsHouseNumberResult'
  @_hash['avs_postcode_result'] = 'avsPostcodeResult'
  @_hash['csc_result'] = 'cscResult'
  @_hash['payer_authentication_result'] = 'payerAuthenticationResult'
  @_hash['payer_ip'] = 'payerIp'
  @_hash['payer_name'] = 'payerName'
  @_hash['payer_email'] = 'payerEmail'
  @_hash['payer_phone'] = 'payerPhone'
  @_hash['ip_country'] = 'ipCountry'
  @_hash['ip_city'] = 'ipCity'
  @_hash['ip_latitude'] = 'ipLatitude'
  @_hash['ip_longitude'] = 'ipLongitude'
  @_hash['merchant_custom_data'] = 'merchantCustomData'
  @_hash['description'] = 'description'
  @_hash['parent_transaction_id'] = 'parentTransactionId'
  @_hash
end

.nullablesObject

An array for nullable fields



261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 261

def self.nullables
  %w[
    auth_date
    confirm_date
    processed_date
    card_type
    card_scheme
    card_mask
    issuer
    issuer_country
    response_code
    auth_code
    avs_result
    avs_house_number_result
    avs_postcode_result
    csc_result
    payer_authentication_result
    payer_ip
    payer_name
    payer_email
    payer_phone
    ip_country
    ip_city
    ip_latitude
    ip_longitude
    merchant_custom_data
    description
    parent_transaction_id
  ]
end

.optionalsObject

An array for optional fields



218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 218

def self.optionals
  %w[
    id
    merchant_id
    merchant_name
    merchant_reference
    amount
    currency
    created_date
    auth_date
    confirm_date
    processed_date
    processed_amount
    type
    status
    payment_method
    card_type
    card_scheme
    card_mask
    issuer
    issuer_country
    response_code
    auth_code
    avs_result
    avs_house_number_result
    avs_postcode_result
    csc_result
    payer_authentication_result
    payer_ip
    payer_name
    payer_email
    payer_phone
    ip_country
    ip_city
    ip_latitude
    ip_longitude
    merchant_custom_data
    description
    parent_transaction_id
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 504

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} id: #{@id.inspect}, merchant_id: #{@merchant_id.inspect}, merchant_name:"\
  " #{@merchant_name.inspect}, merchant_reference: #{@merchant_reference.inspect}, amount:"\
  " #{@amount.inspect}, currency: #{@currency.inspect}, created_date:"\
  " #{@created_date.inspect}, auth_date: #{@auth_date.inspect}, confirm_date:"\
  " #{@confirm_date.inspect}, processed_date: #{@processed_date.inspect}, processed_amount:"\
  " #{@processed_amount.inspect}, type: #{@type.inspect}, status: #{@status.inspect},"\
  " payment_method: #{@payment_method.inspect}, card_type: #{@card_type.inspect}, card_scheme:"\
  " #{@card_scheme.inspect}, card_mask: #{@card_mask.inspect}, issuer: #{@issuer.inspect},"\
  " issuer_country: #{@issuer_country.inspect}, response_code: #{@response_code.inspect},"\
  " auth_code: #{@auth_code.inspect}, avs_result: #{@avs_result.inspect},"\
  " avs_house_number_result: #{@avs_house_number_result.inspect}, avs_postcode_result:"\
  " #{@avs_postcode_result.inspect}, csc_result: #{@csc_result.inspect},"\
  " payer_authentication_result: #{@payer_authentication_result.inspect}, payer_ip:"\
  " #{@payer_ip.inspect}, payer_name: #{@payer_name.inspect}, payer_email:"\
  " #{@payer_email.inspect}, payer_phone: #{@payer_phone.inspect}, ip_country:"\
  " #{@ip_country.inspect}, ip_city: #{@ip_city.inspect}, ip_latitude:"\
  " #{@ip_latitude.inspect}, ip_longitude: #{@ip_longitude.inspect}, merchant_custom_data:"\
  " #{@merchant_custom_data.inspect}, description: #{@description.inspect},"\
  " parent_transaction_id: #{@parent_transaction_id.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_custom_auth_dateObject



471
472
473
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 471

def to_custom_auth_date
  DateTimeHelper.to_rfc3339(auth_date)
end

#to_custom_confirm_dateObject



475
476
477
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 475

def to_custom_confirm_date
  DateTimeHelper.to_rfc3339(confirm_date)
end

#to_custom_created_dateObject



467
468
469
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 467

def to_custom_created_date
  DateTimeHelper.to_rfc3339(created_date)
end

#to_custom_processed_dateObject



479
480
481
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 479

def to_custom_processed_date
  DateTimeHelper.to_rfc3339(processed_date)
end

#to_sObject

Provides a human-readable string representation of the object.



484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb', line 484

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} id: #{@id}, merchant_id: #{@merchant_id}, merchant_name: #{@merchant_name},"\
  " merchant_reference: #{@merchant_reference}, amount: #{@amount}, currency: #{@currency},"\
  " created_date: #{@created_date}, auth_date: #{@auth_date}, confirm_date: #{@confirm_date},"\
  " processed_date: #{@processed_date}, processed_amount: #{@processed_amount}, type:"\
  " #{@type}, status: #{@status}, payment_method: #{@payment_method}, card_type:"\
  " #{@card_type}, card_scheme: #{@card_scheme}, card_mask: #{@card_mask}, issuer: #{@issuer},"\
  " issuer_country: #{@issuer_country}, response_code: #{@response_code}, auth_code:"\
  " #{@auth_code}, avs_result: #{@avs_result}, avs_house_number_result:"\
  " #{@avs_house_number_result}, avs_postcode_result: #{@avs_postcode_result}, csc_result:"\
  " #{@csc_result}, payer_authentication_result: #{@payer_authentication_result}, payer_ip:"\
  " #{@payer_ip}, payer_name: #{@payer_name}, payer_email: #{@payer_email}, payer_phone:"\
  " #{@payer_phone}, ip_country: #{@ip_country}, ip_city: #{@ip_city}, ip_latitude:"\
  " #{@ip_latitude}, ip_longitude: #{@ip_longitude}, merchant_custom_data:"\
  " #{@merchant_custom_data}, description: #{@description}, parent_transaction_id:"\
  " #{@parent_transaction_id}, additional_properties: #{@additional_properties}>"
end