Class: PostFinanceCheckout::Transaction

Inherits:
Object
  • Object
show all
Defined in:
lib/postfinancecheckout-ruby-sdk/models/transaction.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Transaction

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 387

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'acceptHeader')
    self.accept_header = attributes[:'acceptHeader']
  end

  if attributes.has_key?(:'acceptLanguageHeader')
    self.accept_language_header = attributes[:'acceptLanguageHeader']
  end

  if attributes.has_key?(:'allowedPaymentMethodBrands')
    if (value = attributes[:'allowedPaymentMethodBrands']).is_a?(Array)
      self.allowed_payment_method_brands = value
    end
  end

  if attributes.has_key?(:'allowedPaymentMethodConfigurations')
    if (value = attributes[:'allowedPaymentMethodConfigurations']).is_a?(Array)
      self.allowed_payment_method_configurations = value
    end
  end

  if attributes.has_key?(:'authorizationAmount')
    self.authorization_amount = attributes[:'authorizationAmount']
  end

  if attributes.has_key?(:'authorizationEnvironment')
    self.authorization_environment = attributes[:'authorizationEnvironment']
  end

  if attributes.has_key?(:'authorizationSalesChannel')
    self.authorization_sales_channel = attributes[:'authorizationSalesChannel']
  end

  if attributes.has_key?(:'authorizationTimeoutOn')
    self.authorization_timeout_on = attributes[:'authorizationTimeoutOn']
  end

  if attributes.has_key?(:'authorizedOn')
    self.authorized_on = attributes[:'authorizedOn']
  end

  if attributes.has_key?(:'autoConfirmationEnabled')
    self.auto_confirmation_enabled = attributes[:'autoConfirmationEnabled']
  end

  if attributes.has_key?(:'billingAddress')
    self.billing_address = attributes[:'billingAddress']
  end

  if attributes.has_key?(:'chargeRetryEnabled')
    self.charge_retry_enabled = attributes[:'chargeRetryEnabled']
  end

  if attributes.has_key?(:'completedAmount')
    self.completed_amount = attributes[:'completedAmount']
  end

  if attributes.has_key?(:'completedOn')
    self.completed_on = attributes[:'completedOn']
  end

  if attributes.has_key?(:'completionBehavior')
    self.completion_behavior = attributes[:'completionBehavior']
  end

  if attributes.has_key?(:'completionTimeoutOn')
    self.completion_timeout_on = attributes[:'completionTimeoutOn']
  end

  if attributes.has_key?(:'confirmedBy')
    self.confirmed_by = attributes[:'confirmedBy']
  end

  if attributes.has_key?(:'confirmedOn')
    self.confirmed_on = attributes[:'confirmedOn']
  end

  if attributes.has_key?(:'createdBy')
    self.created_by = attributes[:'createdBy']
  end

  if attributes.has_key?(:'createdOn')
    self.created_on = attributes[:'createdOn']
  end

  if attributes.has_key?(:'currency')
    self.currency = attributes[:'currency']
  end

  if attributes.has_key?(:'customerEmailAddress')
    self.customer_email_address = attributes[:'customerEmailAddress']
  end

  if attributes.has_key?(:'customerId')
    self.customer_id = attributes[:'customerId']
  end

  if attributes.has_key?(:'customersPresence')
    self.customers_presence = attributes[:'customersPresence']
  end

  if attributes.has_key?(:'deliveryDecisionMadeOn')
    self.delivery_decision_made_on = attributes[:'deliveryDecisionMadeOn']
  end

  if attributes.has_key?(:'deviceSessionIdentifier')
    self.device_session_identifier = attributes[:'deviceSessionIdentifier']
  end

  if attributes.has_key?(:'emailsDisabled')
    self.emails_disabled = attributes[:'emailsDisabled']
  end

  if attributes.has_key?(:'endOfLife')
    self.end_of_life = attributes[:'endOfLife']
  end

  if attributes.has_key?(:'environment')
    self.environment = attributes[:'environment']
  end

  if attributes.has_key?(:'environmentSelectionStrategy')
    self.environment_selection_strategy = attributes[:'environmentSelectionStrategy']
  end

  if attributes.has_key?(:'failedOn')
    self.failed_on = attributes[:'failedOn']
  end

  if attributes.has_key?(:'failedUrl')
    self.failed_url = attributes[:'failedUrl']
  end

  if attributes.has_key?(:'failureReason')
    self.failure_reason = attributes[:'failureReason']
  end

  if attributes.has_key?(:'group')
    self.group = attributes[:'group']
  end

  if attributes.has_key?(:'id')
    self.id = attributes[:'id']
  end

  if attributes.has_key?(:'internetProtocolAddress')
    self.internet_protocol_address = attributes[:'internetProtocolAddress']
  end

  if attributes.has_key?(:'internetProtocolAddressCountry')
    self.internet_protocol_address_country = attributes[:'internetProtocolAddressCountry']
  end

  if attributes.has_key?(:'invoiceMerchantReference')
    self.invoice_merchant_reference = attributes[:'invoiceMerchantReference']
  end

  if attributes.has_key?(:'javaEnabled')
    self.java_enabled = attributes[:'javaEnabled']
  end

  if attributes.has_key?(:'language')
    self.language = attributes[:'language']
  end

  if attributes.has_key?(:'lineItems')
    if (value = attributes[:'lineItems']).is_a?(Array)
      self.line_items = value
    end
  end

  if attributes.has_key?(:'linkedSpaceId')
    self.linked_space_id = attributes[:'linkedSpaceId']
  end

  if attributes.has_key?(:'merchantReference')
    self.merchant_reference = attributes[:'merchantReference']
  end

  if attributes.has_key?(:'metaData')
    if (value = attributes[:'metaData']).is_a?(Hash)
      self. = value
    end
  end

  if attributes.has_key?(:'parent')
    self.parent = attributes[:'parent']
  end

  if attributes.has_key?(:'paymentConnectorConfiguration')
    self.payment_connector_configuration = attributes[:'paymentConnectorConfiguration']
  end

  if attributes.has_key?(:'plannedPurgeDate')
    self.planned_purge_date = attributes[:'plannedPurgeDate']
  end

  if attributes.has_key?(:'processingOn')
    self.processing_on = attributes[:'processingOn']
  end

  if attributes.has_key?(:'refundedAmount')
    self.refunded_amount = attributes[:'refundedAmount']
  end

  if attributes.has_key?(:'screenColorDepth')
    self.screen_color_depth = attributes[:'screenColorDepth']
  end

  if attributes.has_key?(:'screenHeight')
    self.screen_height = attributes[:'screenHeight']
  end

  if attributes.has_key?(:'screenWidth')
    self.screen_width = attributes[:'screenWidth']
  end

  if attributes.has_key?(:'shippingAddress')
    self.shipping_address = attributes[:'shippingAddress']
  end

  if attributes.has_key?(:'shippingMethod')
    self.shipping_method = attributes[:'shippingMethod']
  end

  if attributes.has_key?(:'spaceViewId')
    self.space_view_id = attributes[:'spaceViewId']
  end

  if attributes.has_key?(:'state')
    self.state = attributes[:'state']
  end

  if attributes.has_key?(:'successUrl')
    self.success_url = attributes[:'successUrl']
  end

  if attributes.has_key?(:'terminal')
    self.terminal = attributes[:'terminal']
  end

  if attributes.has_key?(:'timeZone')
    self.time_zone = attributes[:'timeZone']
  end

  if attributes.has_key?(:'token')
    self.token = attributes[:'token']
  end

  if attributes.has_key?(:'tokenizationMode')
    self.tokenization_mode = attributes[:'tokenizationMode']
  end

  if attributes.has_key?(:'totalAppliedFees')
    self.total_applied_fees = attributes[:'totalAppliedFees']
  end

  if attributes.has_key?(:'totalSettledAmount')
    self.total_settled_amount = attributes[:'totalSettledAmount']
  end

  if attributes.has_key?(:'userAgentHeader')
    self.user_agent_header = attributes[:'userAgentHeader']
  end

  if attributes.has_key?(:'userFailureMessage')
    self.user_failure_message = attributes[:'userFailureMessage']
  end

  if attributes.has_key?(:'userInterfaceType')
    self.user_interface_type = attributes[:'userInterfaceType']
  end

  if attributes.has_key?(:'version')
    self.version = attributes[:'version']
  end

  if attributes.has_key?(:'windowHeight')
    self.window_height = attributes[:'windowHeight']
  end

  if attributes.has_key?(:'windowWidth')
    self.window_width = attributes[:'windowWidth']
  end

  if attributes.has_key?(:'yearsToKeep')
    self.years_to_keep = attributes[:'yearsToKeep']
  end
end

Instance Attribute Details

#accept_headerObject

Returns the value of attribute accept_header.



24
25
26
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 24

def accept_header
  @accept_header
end

#accept_language_headerObject

The accept language contains the header which indicates the language preferences of the buyer.



27
28
29
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 27

def accept_language_header
  @accept_language_header
end

#allowed_payment_method_brandsObject

Returns the value of attribute allowed_payment_method_brands.



30
31
32
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 30

def allowed_payment_method_brands
  @allowed_payment_method_brands
end

#allowed_payment_method_configurationsObject

Returns the value of attribute allowed_payment_method_configurations.



33
34
35
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 33

def allowed_payment_method_configurations
  @allowed_payment_method_configurations
end

#authorization_amountObject

Returns the value of attribute authorization_amount.



36
37
38
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 36

def authorization_amount
  @authorization_amount
end

#authorization_environmentObject

The environment in which this transaction was successfully authorized.



39
40
41
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 39

def authorization_environment
  @authorization_environment
end

#authorization_sales_channelObject

The sales channel through which the transaction was placed.



42
43
44
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 42

def authorization_sales_channel
  @authorization_sales_channel
end

#authorization_timeout_onObject

This is the time on which the transaction will be timed out when it is not at least authorized. The timeout time may change over time.



45
46
47
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 45

def authorization_timeout_on
  @authorization_timeout_on
end

#authorized_onObject

Returns the value of attribute authorized_on.



48
49
50
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 48

def authorized_on
  @authorized_on
end

#auto_confirmation_enabledObject

When auto confirmation is enabled the transaction can be confirmed by the user and does not require an explicit confirmation through the web service API.



51
52
53
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 51

def auto_confirmation_enabled
  @auto_confirmation_enabled
end

#billing_addressObject

Returns the value of attribute billing_address.



54
55
56
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 54

def billing_address
  @billing_address
end

#charge_retry_enabledObject

When the charging of the customer fails we can retry the charging. This implies that we redirect the user back to the payment page which allows the customer to retry. By default we will retry.



57
58
59
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 57

def charge_retry_enabled
  @charge_retry_enabled
end

#completed_amountObject

The completed amount is the total amount which has been captured so far.



60
61
62
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 60

def completed_amount
  @completed_amount
end

#completed_onObject

Returns the value of attribute completed_on.



63
64
65
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 63

def completed_on
  @completed_on
end

#completion_behaviorObject

The completion behavior controls when the transaction is completed.



66
67
68
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 66

def completion_behavior
  @completion_behavior
end

#completion_timeout_onObject

Returns the value of attribute completion_timeout_on.



69
70
71
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 69

def completion_timeout_on
  @completion_timeout_on
end

#confirmed_byObject

Returns the value of attribute confirmed_by.



72
73
74
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 72

def confirmed_by
  @confirmed_by
end

#confirmed_onObject

Returns the value of attribute confirmed_on.



75
76
77
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 75

def confirmed_on
  @confirmed_on
end

#created_byObject

Returns the value of attribute created_by.



78
79
80
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 78

def created_by
  @created_by
end

#created_onObject

The date and time when the object was created.



81
82
83
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 81

def created_on
  @created_on
end

#currencyObject

Returns the value of attribute currency.



84
85
86
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 84

def currency
  @currency
end

#customer_email_addressObject

The customer email address is the email address of the customer. If no email address is provided on the shipping or billing address this address is used.



87
88
89
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 87

def customer_email_address
  @customer_email_address
end

#customer_idObject

Returns the value of attribute customer_id.



90
91
92
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 90

def customer_id
  @customer_id
end

#customers_presenceObject

The customer’s presence indicates what kind of authentication method was finally used during authorization of the transaction. If no value is provided, ‘Virtually Present’ is used by default.



93
94
95
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 93

def customers_presence
  @customers_presence
end

#delivery_decision_made_onObject

This date indicates when the decision has been made if a transaction should be delivered or not.



96
97
98
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 96

def delivery_decision_made_on
  @delivery_decision_made_on
end

#device_session_identifierObject

The device session identifier links the transaction with the session identifier provided in the URL of the device data JavaScript. This allows to link the transaction with the collected device data of the buyer.



99
100
101
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 99

def device_session_identifier
  @device_session_identifier
end

#emails_disabledObject

Flag indicating whether email sending is disabled for this particular transaction. Defaults to false.



102
103
104
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 102

def emails_disabled
  @emails_disabled
end

#end_of_lifeObject

The transaction’s end of life indicates the date from which on no operation can be carried out anymore.



105
106
107
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 105

def end_of_life
  @end_of_life
end

#environmentObject

Returns the value of attribute environment.



108
109
110
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 108

def environment
  @environment
end

#environment_selection_strategyObject

The environment selection strategy determines how the environment (test or production) for processing the transaction is selected.



111
112
113
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 111

def environment_selection_strategy
  @environment_selection_strategy
end

#failed_onObject

Returns the value of attribute failed_on.



114
115
116
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 114

def failed_on
  @failed_on
end

#failed_urlObject

The user will be redirected to failed URL when the transaction could not be authorized or completed. In case no failed URL is specified a default failed page will be displayed.



117
118
119
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 117

def failed_url
  @failed_url
end

#failure_reasonObject

The failure reason describes why the transaction failed. This is only provided when the transaction is marked as failed.



120
121
122
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 120

def failure_reason
  @failure_reason
end

#groupObject

Returns the value of attribute group.



123
124
125
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 123

def group
  @group
end

#idObject

A unique identifier for the object.



126
127
128
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 126

def id
  @id
end

#internet_protocol_addressObject

The Internet Protocol (IP) address identifies the device of the buyer.



129
130
131
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 129

def internet_protocol_address
  @internet_protocol_address
end

#internet_protocol_address_countryObject

Returns the value of attribute internet_protocol_address_country.



132
133
134
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 132

def internet_protocol_address_country
  @internet_protocol_address_country
end

#invoice_merchant_referenceObject

Returns the value of attribute invoice_merchant_reference.



135
136
137
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 135

def invoice_merchant_reference
  @invoice_merchant_reference
end

#java_enabledObject

Returns the value of attribute java_enabled.



138
139
140
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 138

def java_enabled
  @java_enabled
end

#languageObject

The language that is linked to the object.



141
142
143
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 141

def language
  @language
end

#line_itemsObject

Returns the value of attribute line_items.



144
145
146
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 144

def line_items
  @line_items
end

#linked_space_idObject

The ID of the space this object belongs to.



147
148
149
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 147

def linked_space_id
  @linked_space_id
end

#merchant_referenceObject

Returns the value of attribute merchant_reference.



150
151
152
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 150

def merchant_reference
  @merchant_reference
end

#meta_dataObject

Allow to store additional information about the object.



153
154
155
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 153

def 
  @meta_data
end

#parentObject

Returns the value of attribute parent.



156
157
158
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 156

def parent
  @parent
end

#payment_connector_configurationObject

Returns the value of attribute payment_connector_configuration.



159
160
161
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 159

def payment_connector_configuration
  @payment_connector_configuration
end

#planned_purge_dateObject

The date and time when the object is planned to be permanently removed. If the value is empty, the object will not be removed.



162
163
164
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 162

def planned_purge_date
  @planned_purge_date
end

#processing_onObject

Returns the value of attribute processing_on.



165
166
167
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 165

def processing_on
  @processing_on
end

#refunded_amountObject

The refunded amount is the total amount which has been refunded so far.



168
169
170
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 168

def refunded_amount
  @refunded_amount
end

#screen_color_depthObject

Returns the value of attribute screen_color_depth.



171
172
173
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 171

def screen_color_depth
  @screen_color_depth
end

#screen_heightObject

Returns the value of attribute screen_height.



174
175
176
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 174

def screen_height
  @screen_height
end

#screen_widthObject

Returns the value of attribute screen_width.



177
178
179
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 177

def screen_width
  @screen_width
end

#shipping_addressObject

Returns the value of attribute shipping_address.



180
181
182
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 180

def shipping_address
  @shipping_address
end

#shipping_methodObject

Returns the value of attribute shipping_method.



183
184
185
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 183

def shipping_method
  @shipping_method
end

#space_view_idObject

Returns the value of attribute space_view_id.



186
187
188
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 186

def space_view_id
  @space_view_id
end

#stateObject

The object’s current state.



189
190
191
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 189

def state
  @state
end

#success_urlObject

The user will be redirected to success URL when the transaction could be authorized or completed. In case no success URL is specified a default success page will be displayed.



192
193
194
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 192

def success_url
  @success_url
end

#terminalObject

The terminal on which the payment was processed.



195
196
197
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 195

def terminal
  @terminal
end

#time_zoneObject

The time zone defines in which time zone the customer is located in. The time zone may affects how dates are formatted when interacting with the customer.



198
199
200
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 198

def time_zone
  @time_zone
end

#tokenObject

Returns the value of attribute token.



201
202
203
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 201

def token
  @token
end

#tokenization_modeObject

The tokenization mode controls if and how the tokenization of payment information is applied to the transaction.



204
205
206
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 204

def tokenization_mode
  @tokenization_mode
end

#total_applied_feesObject

The total applied fees is the sum of all fees that have been applied so far.



207
208
209
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 207

def total_applied_fees
  @total_applied_fees
end

#total_settled_amountObject

The total settled amount is the total amount which has been settled so far.



210
211
212
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 210

def total_settled_amount
  @total_settled_amount
end

#user_agent_headerObject

The user agent header provides the exact string which contains the user agent of the buyer.



213
214
215
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 213

def user_agent_header
  @user_agent_header
end

#user_failure_messageObject

The failure message describes for an end user why the transaction is failed in the language of the user. This is only provided when the transaction is marked as failed.



216
217
218
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 216

def user_failure_message
  @user_failure_message
end

#user_interface_typeObject

The user interface type defines through which user interface the transaction has been processed resp. created.



219
220
221
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 219

def user_interface_type
  @user_interface_type
end

#versionObject

The version is used for optimistic locking and incremented whenever the object is updated.



222
223
224
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 222

def version
  @version
end

#window_heightObject

Returns the value of attribute window_height.



225
226
227
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 225

def window_height
  @window_height
end

#window_widthObject

Returns the value of attribute window_width.



228
229
230
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 228

def window_width
  @window_width
end

#years_to_keepObject

The number of years the transaction will be stored after it has been authorized.



231
232
233
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 231

def years_to_keep
  @years_to_keep
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



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
259
260
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
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 234

def self.attribute_map
  {
    :'accept_header' => :'acceptHeader',
    :'accept_language_header' => :'acceptLanguageHeader',
    :'allowed_payment_method_brands' => :'allowedPaymentMethodBrands',
    :'allowed_payment_method_configurations' => :'allowedPaymentMethodConfigurations',
    :'authorization_amount' => :'authorizationAmount',
    :'authorization_environment' => :'authorizationEnvironment',
    :'authorization_sales_channel' => :'authorizationSalesChannel',
    :'authorization_timeout_on' => :'authorizationTimeoutOn',
    :'authorized_on' => :'authorizedOn',
    :'auto_confirmation_enabled' => :'autoConfirmationEnabled',
    :'billing_address' => :'billingAddress',
    :'charge_retry_enabled' => :'chargeRetryEnabled',
    :'completed_amount' => :'completedAmount',
    :'completed_on' => :'completedOn',
    :'completion_behavior' => :'completionBehavior',
    :'completion_timeout_on' => :'completionTimeoutOn',
    :'confirmed_by' => :'confirmedBy',
    :'confirmed_on' => :'confirmedOn',
    :'created_by' => :'createdBy',
    :'created_on' => :'createdOn',
    :'currency' => :'currency',
    :'customer_email_address' => :'customerEmailAddress',
    :'customer_id' => :'customerId',
    :'customers_presence' => :'customersPresence',
    :'delivery_decision_made_on' => :'deliveryDecisionMadeOn',
    :'device_session_identifier' => :'deviceSessionIdentifier',
    :'emails_disabled' => :'emailsDisabled',
    :'end_of_life' => :'endOfLife',
    :'environment' => :'environment',
    :'environment_selection_strategy' => :'environmentSelectionStrategy',
    :'failed_on' => :'failedOn',
    :'failed_url' => :'failedUrl',
    :'failure_reason' => :'failureReason',
    :'group' => :'group',
    :'id' => :'id',
    :'internet_protocol_address' => :'internetProtocolAddress',
    :'internet_protocol_address_country' => :'internetProtocolAddressCountry',
    :'invoice_merchant_reference' => :'invoiceMerchantReference',
    :'java_enabled' => :'javaEnabled',
    :'language' => :'language',
    :'line_items' => :'lineItems',
    :'linked_space_id' => :'linkedSpaceId',
    :'merchant_reference' => :'merchantReference',
    :'meta_data' => :'metaData',
    :'parent' => :'parent',
    :'payment_connector_configuration' => :'paymentConnectorConfiguration',
    :'planned_purge_date' => :'plannedPurgeDate',
    :'processing_on' => :'processingOn',
    :'refunded_amount' => :'refundedAmount',
    :'screen_color_depth' => :'screenColorDepth',
    :'screen_height' => :'screenHeight',
    :'screen_width' => :'screenWidth',
    :'shipping_address' => :'shippingAddress',
    :'shipping_method' => :'shippingMethod',
    :'space_view_id' => :'spaceViewId',
    :'state' => :'state',
    :'success_url' => :'successUrl',
    :'terminal' => :'terminal',
    :'time_zone' => :'timeZone',
    :'token' => :'token',
    :'tokenization_mode' => :'tokenizationMode',
    :'total_applied_fees' => :'totalAppliedFees',
    :'total_settled_amount' => :'totalSettledAmount',
    :'user_agent_header' => :'userAgentHeader',
    :'user_failure_message' => :'userFailureMessage',
    :'user_interface_type' => :'userInterfaceType',
    :'version' => :'version',
    :'window_height' => :'windowHeight',
    :'window_width' => :'windowWidth',
    :'years_to_keep' => :'yearsToKeep'
  }
end

.swagger_typesObject

Attribute type mapping.



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
352
353
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
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 310

def self.swagger_types
  {
    :'accept_header' => :'String',
    :'accept_language_header' => :'String',
    :'allowed_payment_method_brands' => :'Array<Integer>',
    :'allowed_payment_method_configurations' => :'Array<Integer>',
    :'authorization_amount' => :'Float',
    :'authorization_environment' => :'ChargeAttemptEnvironment',
    :'authorization_sales_channel' => :'Integer',
    :'authorization_timeout_on' => :'DateTime',
    :'authorized_on' => :'DateTime',
    :'auto_confirmation_enabled' => :'BOOLEAN',
    :'billing_address' => :'Address',
    :'charge_retry_enabled' => :'BOOLEAN',
    :'completed_amount' => :'Float',
    :'completed_on' => :'DateTime',
    :'completion_behavior' => :'TransactionCompletionBehavior',
    :'completion_timeout_on' => :'DateTime',
    :'confirmed_by' => :'Integer',
    :'confirmed_on' => :'DateTime',
    :'created_by' => :'Integer',
    :'created_on' => :'DateTime',
    :'currency' => :'String',
    :'customer_email_address' => :'String',
    :'customer_id' => :'String',
    :'customers_presence' => :'CustomersPresence',
    :'delivery_decision_made_on' => :'DateTime',
    :'device_session_identifier' => :'String',
    :'emails_disabled' => :'BOOLEAN',
    :'end_of_life' => :'DateTime',
    :'environment' => :'Environment',
    :'environment_selection_strategy' => :'TransactionEnvironmentSelectionStrategy',
    :'failed_on' => :'DateTime',
    :'failed_url' => :'String',
    :'failure_reason' => :'FailureReason',
    :'group' => :'TransactionGroup',
    :'id' => :'Integer',
    :'internet_protocol_address' => :'String',
    :'internet_protocol_address_country' => :'String',
    :'invoice_merchant_reference' => :'String',
    :'java_enabled' => :'BOOLEAN',
    :'language' => :'String',
    :'line_items' => :'Array<LineItem>',
    :'linked_space_id' => :'Integer',
    :'merchant_reference' => :'String',
    :'meta_data' => :'Hash<String, String>',
    :'parent' => :'Integer',
    :'payment_connector_configuration' => :'PaymentConnectorConfiguration',
    :'planned_purge_date' => :'DateTime',
    :'processing_on' => :'DateTime',
    :'refunded_amount' => :'Float',
    :'screen_color_depth' => :'String',
    :'screen_height' => :'String',
    :'screen_width' => :'String',
    :'shipping_address' => :'Address',
    :'shipping_method' => :'String',
    :'space_view_id' => :'Integer',
    :'state' => :'TransactionState',
    :'success_url' => :'String',
    :'terminal' => :'PaymentTerminal',
    :'time_zone' => :'String',
    :'token' => :'Token',
    :'tokenization_mode' => :'TokenizationMode',
    :'total_applied_fees' => :'Float',
    :'total_settled_amount' => :'Float',
    :'user_agent_header' => :'String',
    :'user_failure_message' => :'String',
    :'user_interface_type' => :'TransactionUserInterfaceType',
    :'version' => :'Integer',
    :'window_height' => :'String',
    :'window_width' => :'String',
    :'years_to_keep' => :'Integer'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 829

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      accept_header == o.accept_header &&
      accept_language_header == o.accept_language_header &&
      allowed_payment_method_brands == o.allowed_payment_method_brands &&
      allowed_payment_method_configurations == o.allowed_payment_method_configurations &&
      authorization_amount == o.authorization_amount &&
      authorization_environment == o.authorization_environment &&
      authorization_sales_channel == o.authorization_sales_channel &&
      authorization_timeout_on == o.authorization_timeout_on &&
      authorized_on == o.authorized_on &&
      auto_confirmation_enabled == o.auto_confirmation_enabled &&
      billing_address == o.billing_address &&
      charge_retry_enabled == o.charge_retry_enabled &&
      completed_amount == o.completed_amount &&
      completed_on == o.completed_on &&
      completion_behavior == o.completion_behavior &&
      completion_timeout_on == o.completion_timeout_on &&
      confirmed_by == o.confirmed_by &&
      confirmed_on == o.confirmed_on &&
      created_by == o.created_by &&
      created_on == o.created_on &&
      currency == o.currency &&
      customer_email_address == o.customer_email_address &&
      customer_id == o.customer_id &&
      customers_presence == o.customers_presence &&
      delivery_decision_made_on == o.delivery_decision_made_on &&
      device_session_identifier == o.device_session_identifier &&
      emails_disabled == o.emails_disabled &&
      end_of_life == o.end_of_life &&
      environment == o.environment &&
      environment_selection_strategy == o.environment_selection_strategy &&
      failed_on == o.failed_on &&
      failed_url == o.failed_url &&
      failure_reason == o.failure_reason &&
      group == o.group &&
      id == o.id &&
      internet_protocol_address == o.internet_protocol_address &&
      internet_protocol_address_country == o.internet_protocol_address_country &&
      invoice_merchant_reference == o.invoice_merchant_reference &&
      java_enabled == o.java_enabled &&
      language == o.language &&
      line_items == o.line_items &&
      linked_space_id == o.linked_space_id &&
      merchant_reference == o.merchant_reference &&
       == o. &&
      parent == o.parent &&
      payment_connector_configuration == o.payment_connector_configuration &&
      planned_purge_date == o.planned_purge_date &&
      processing_on == o.processing_on &&
      refunded_amount == o.refunded_amount &&
      screen_color_depth == o.screen_color_depth &&
      screen_height == o.screen_height &&
      screen_width == o.screen_width &&
      shipping_address == o.shipping_address &&
      shipping_method == o.shipping_method &&
      space_view_id == o.space_view_id &&
      state == o.state &&
      success_url == o.success_url &&
      terminal == o.terminal &&
      time_zone == o.time_zone &&
      token == o.token &&
      tokenization_mode == o.tokenization_mode &&
      total_applied_fees == o.total_applied_fees &&
      total_settled_amount == o.total_settled_amount &&
      user_agent_header == o.user_agent_header &&
      user_failure_message == o.user_failure_message &&
      user_interface_type == o.user_interface_type &&
      version == o.version &&
      window_height == o.window_height &&
      window_width == o.window_width &&
      years_to_keep == o.years_to_keep
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 940

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = PostFinanceCheckout.const_get(type).new
    temp_model.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 1006

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map{ |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 919

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


906
907
908
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 906

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



912
913
914
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 912

def hash
  [accept_header, accept_language_header, allowed_payment_method_brands, allowed_payment_method_configurations, authorization_amount, authorization_environment, authorization_sales_channel, authorization_timeout_on, authorized_on, auto_confirmation_enabled, billing_address, charge_retry_enabled, completed_amount, completed_on, completion_behavior, completion_timeout_on, confirmed_by, confirmed_on, created_by, created_on, currency, customer_email_address, customer_id, customers_presence, delivery_decision_made_on, device_session_identifier, emails_disabled, end_of_life, environment, environment_selection_strategy, failed_on, failed_url, failure_reason, group, id, internet_protocol_address, internet_protocol_address_country, invoice_merchant_reference, java_enabled, language, line_items, linked_space_id, merchant_reference, , parent, payment_connector_configuration, planned_purge_date, processing_on, refunded_amount, screen_color_depth, screen_height, screen_width, shipping_address, shipping_method, space_view_id, state, success_url, terminal, time_zone, token, tokenization_mode, total_applied_fees, total_settled_amount, user_agent_header, user_failure_message, user_interface_type, version, window_height, window_width, years_to_keep].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 684

def list_invalid_properties
  invalid_properties = Array.new
  if !@customer_email_address.nil? && @customer_email_address.to_s.length > 254
    invalid_properties.push('invalid value for "customer_email_address", the character length must be smaller than or equal to 254.')
  end

  if !@device_session_identifier.nil? && @device_session_identifier.to_s.length > 40
    invalid_properties.push('invalid value for "device_session_identifier", the character length must be smaller than or equal to 40.')
  end

  if !@device_session_identifier.nil? && @device_session_identifier.to_s.length < 10
    invalid_properties.push('invalid value for "device_session_identifier", the character length must be great than or equal to 10.')
  end

  if !@failed_url.nil? && @failed_url.to_s.length > 2000
    invalid_properties.push('invalid value for "failed_url", the character length must be smaller than or equal to 2000.')
  end

  if !@failed_url.nil? && @failed_url.to_s.length < 9
    invalid_properties.push('invalid value for "failed_url", the character length must be great than or equal to 9.')
  end

  if !@invoice_merchant_reference.nil? && @invoice_merchant_reference.to_s.length > 100
    invalid_properties.push('invalid value for "invoice_merchant_reference", the character length must be smaller than or equal to 100.')
  end

  if !@merchant_reference.nil? && @merchant_reference.to_s.length > 100
    invalid_properties.push('invalid value for "merchant_reference", the character length must be smaller than or equal to 100.')
  end

  if !@shipping_method.nil? && @shipping_method.to_s.length > 200
    invalid_properties.push('invalid value for "shipping_method", the character length must be smaller than or equal to 200.')
  end

  if !@success_url.nil? && @success_url.to_s.length > 2000
    invalid_properties.push('invalid value for "success_url", the character length must be smaller than or equal to 2000.')
  end

  if !@success_url.nil? && @success_url.to_s.length < 9
    invalid_properties.push('invalid value for "success_url", the character length must be great than or equal to 9.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



986
987
988
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 986

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



992
993
994
995
996
997
998
999
1000
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 992

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



980
981
982
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 980

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



731
732
733
734
735
736
737
738
739
740
741
742
743
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 731

def valid?
  return false if !@customer_email_address.nil? && @customer_email_address.to_s.length > 254
  return false if !@device_session_identifier.nil? && @device_session_identifier.to_s.length > 40
  return false if !@device_session_identifier.nil? && @device_session_identifier.to_s.length < 10
  return false if !@failed_url.nil? && @failed_url.to_s.length > 2000
  return false if !@failed_url.nil? && @failed_url.to_s.length < 9
  return false if !@invoice_merchant_reference.nil? && @invoice_merchant_reference.to_s.length > 100
  return false if !@merchant_reference.nil? && @merchant_reference.to_s.length > 100
  return false if !@shipping_method.nil? && @shipping_method.to_s.length > 200
  return false if !@success_url.nil? && @success_url.to_s.length > 2000
  return false if !@success_url.nil? && @success_url.to_s.length < 9
  true
end