Class: PostfinancecheckoutRubySdk::Transaction
- Inherits:
-
Object
- Object
- PostfinancecheckoutRubySdk::Transaction
- Defined in:
- lib/postfinancecheckout-ruby-sdk/models/transaction.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#accept_header ⇒ Object
The ‘Accept’ header of the customer’s web browser.
-
#accept_language_header ⇒ Object
The ‘Accept Language’ header of the customer’s web browser.
-
#allowed_payment_method_brands ⇒ Object
The payment method brands that can be used to authorize the transaction.
-
#allowed_payment_method_configurations ⇒ Object
The payment method configurations that can be used to authorize the transaction.
-
#authorization_amount ⇒ Object
The sum of all line item prices including taxes in the transaction’s currency.
-
#authorization_environment ⇒ Object
Returns the value of attribute authorization_environment.
-
#authorization_sales_channel ⇒ Object
The sales channel through which the transaction was placed.
-
#authorization_timeout_on ⇒ Object
The date and time when the transaction must be authorized, otherwise it will canceled.
-
#authorized_on ⇒ Object
The date and time when the transaction was authorized.
-
#auto_confirmation_enabled ⇒ Object
Whether the transaction can be confirmed automatically or whether this must be done explicitly via the API.
-
#billing_address ⇒ Object
Returns the value of attribute billing_address.
-
#charge_retry_enabled ⇒ Object
Whether the customer can make further payment attempts if the first one has failed.
-
#completed_amount ⇒ Object
The total amount that was completed, in the transaction’s currency.
-
#completed_on ⇒ Object
The date and time when the transaction was completed.
-
#completion_behavior ⇒ Object
Returns the value of attribute completion_behavior.
-
#completion_timeout_on ⇒ Object
The date and time when the transaction is completed automatically.
-
#confirmed_by ⇒ Object
The ID of the user the transaction was confirmed by.
-
#confirmed_on ⇒ Object
The date and time when the transaction was created.
-
#created_by ⇒ Object
The ID of the user the transaction was created by.
-
#created_on ⇒ Object
The date and time when the object was created.
-
#currency ⇒ Object
The three-letter code (ISO 4217 format) of the transaction’s currency.
-
#customer_email_address ⇒ Object
The customer’s email address.
-
#customer_id ⇒ Object
The unique identifier of the customer in the external system.
-
#customers_presence ⇒ Object
Returns the value of attribute customers_presence.
-
#delivery_decision_made_on ⇒ Object
This date and time when the decision was made as to whether the order should be shipped.
-
#device_session_identifier ⇒ Object
Allows to link the transaction to the data collected from the customer’s device.
-
#emails_disabled ⇒ Object
Whether email sending is deactivated for the transaction.
-
#end_of_life ⇒ Object
The date and time when the transaction reaches its end of live.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#environment_selection_strategy ⇒ Object
Returns the value of attribute environment_selection_strategy.
-
#failed_on ⇒ Object
The date and time when the transaction failed.
-
#failed_url ⇒ Object
The URL to redirect the customer back to after they canceled or failed to authenticated their payment.
-
#failure_reason ⇒ Object
Returns the value of attribute failure_reason.
-
#group ⇒ Object
Returns the value of attribute group.
-
#id ⇒ Object
A unique identifier for the object.
-
#internet_protocol_address ⇒ Object
The IP address of the customer’s device.
-
#internet_protocol_address_country ⇒ Object
The country determined from the IP address of the customer’s device.
-
#invoice_merchant_reference ⇒ Object
The merchant’s reference used to identify the invoice.
-
#java_enabled ⇒ Object
Whether Java is enabled on the customer’s web browser.
-
#language ⇒ Object
The language that is linked to the object.
-
#line_items ⇒ Object
The line items purchased by the customer.
-
#linked_space_id ⇒ Object
The ID of the space this object belongs to.
-
#merchant_reference ⇒ Object
The merchant’s reference used to identify the transaction.
-
#meta_data ⇒ Object
Allow to store additional information about the object.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#payment_connector_configuration ⇒ Object
Returns the value of attribute payment_connector_configuration.
-
#planned_purge_date ⇒ Object
The date and time when the object is planned to be permanently removed.
-
#processing_on ⇒ Object
The date and time when the processing of the transaction was started.
-
#refunded_amount ⇒ Object
The total amount that was refunded, in the transaction’s currency.
-
#screen_color_depth ⇒ Object
The screen color depth of the customer’s web browser.
-
#screen_height ⇒ Object
The screen height of the customer’s web browser.
-
#screen_width ⇒ Object
The screen width of the customer’s web browser.
-
#shipping_address ⇒ Object
Returns the value of attribute shipping_address.
-
#shipping_method ⇒ Object
The name of the shipping method used to ship the products.
-
#space_view_id ⇒ Object
The ID of the space view this object is linked to.
-
#state ⇒ Object
Returns the value of attribute state.
-
#success_url ⇒ Object
The URL to redirect the customer back to after they successfully authenticated their payment.
-
#terminal ⇒ Object
Returns the value of attribute terminal.
-
#time_zone ⇒ Object
The customer’s time zone, which affects how dates and times are formatted when communicating with the customer.
-
#token ⇒ Object
Returns the value of attribute token.
-
#tokenization_mode ⇒ Object
Returns the value of attribute tokenization_mode.
-
#total_applied_fees ⇒ Object
The total of all fees charged, in the transaction’s currency.
-
#total_settled_amount ⇒ Object
The total amount that was settled, in the transaction’s currency.
-
#user_agent_header ⇒ Object
The ‘User Agent’ header of the customer’s web browser.
-
#user_failure_message ⇒ Object
The message that can be displayed to the customer explaining why the transaction failed, in the customer’s language.
-
#user_interface_type ⇒ Object
Returns the value of attribute user_interface_type.
-
#version ⇒ Object
The version is used for optimistic locking and incremented whenever the object is updated.
-
#window_height ⇒ Object
The window height of the customer’s web browser.
-
#window_width ⇒ Object
The window width of the customer’s web browser.
-
#years_to_keep ⇒ Object
The number of years the transaction is kept after its authorization.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Transaction
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Transaction
Initializes the object
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 681 682 683 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 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 414 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `PostfinancecheckoutRubySdk::Transaction` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `PostfinancecheckoutRubySdk::Transaction`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'parent') self.parent = attributes[:'parent'] end if attributes.key?(:'total_settled_amount') self.total_settled_amount = attributes[:'total_settled_amount'] end if attributes.key?(:'device_session_identifier') self.device_session_identifier = attributes[:'device_session_identifier'] end if attributes.key?(:'processing_on') self.processing_on = attributes[:'processing_on'] end if attributes.key?(:'invoice_merchant_reference') self.invoice_merchant_reference = attributes[:'invoice_merchant_reference'] end if attributes.key?(:'language') self.language = attributes[:'language'] end if attributes.key?(:'confirmed_on') self.confirmed_on = attributes[:'confirmed_on'] end if attributes.key?(:'line_items') if (value = attributes[:'line_items']).is_a?(Array) self.line_items = value end end if attributes.key?(:'accept_language_header') self.accept_language_header = attributes[:'accept_language_header'] end if attributes.key?(:'java_enabled') self.java_enabled = attributes[:'java_enabled'] end if attributes.key?(:'confirmed_by') self.confirmed_by = attributes[:'confirmed_by'] end if attributes.key?(:'payment_connector_configuration') self.payment_connector_configuration = attributes[:'payment_connector_configuration'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'state') self.state = attributes[:'state'] end if attributes.key?(:'window_width') self.window_width = attributes[:'window_width'] end if attributes.key?(:'allowed_payment_method_configurations') if (value = attributes[:'allowed_payment_method_configurations']).is_a?(Array) self.allowed_payment_method_configurations = value end end if attributes.key?(:'group') self.group = attributes[:'group'] end if attributes.key?(:'charge_retry_enabled') self.charge_retry_enabled = attributes[:'charge_retry_enabled'] end if attributes.key?(:'accept_header') self.accept_header = attributes[:'accept_header'] end if attributes.key?(:'user_agent_header') self.user_agent_header = attributes[:'user_agent_header'] end if attributes.key?(:'shipping_method') self.shipping_method = attributes[:'shipping_method'] end if attributes.key?(:'planned_purge_date') self.planned_purge_date = attributes[:'planned_purge_date'] end if attributes.key?(:'success_url') self.success_url = attributes[:'success_url'] end if attributes.key?(:'time_zone') self.time_zone = attributes[:'time_zone'] end if attributes.key?(:'space_view_id') self.space_view_id = attributes[:'space_view_id'] end if attributes.key?(:'user_failure_message') self. = attributes[:'user_failure_message'] end if attributes.key?(:'completion_behavior') self.completion_behavior = attributes[:'completion_behavior'] end if attributes.key?(:'version') self.version = attributes[:'version'] end if attributes.key?(:'internet_protocol_address_country') self.internet_protocol_address_country = attributes[:'internet_protocol_address_country'] end if attributes.key?(:'linked_space_id') self.linked_space_id = attributes[:'linked_space_id'] end if attributes.key?(:'delivery_decision_made_on') self.delivery_decision_made_on = attributes[:'delivery_decision_made_on'] end if attributes.key?(:'authorization_environment') self. = attributes[:'authorization_environment'] end if attributes.key?(:'auto_confirmation_enabled') self.auto_confirmation_enabled = attributes[:'auto_confirmation_enabled'] end if attributes.key?(:'failure_reason') self.failure_reason = attributes[:'failure_reason'] end if attributes.key?(:'total_applied_fees') self.total_applied_fees = attributes[:'total_applied_fees'] end if attributes.key?(:'customers_presence') self.customers_presence = attributes[:'customers_presence'] end if attributes.key?(:'failed_on') self.failed_on = attributes[:'failed_on'] end if attributes.key?(:'refunded_amount') self.refunded_amount = attributes[:'refunded_amount'] end if attributes.key?(:'authorization_amount') self. = attributes[:'authorization_amount'] end if attributes.key?(:'screen_width') self.screen_width = attributes[:'screen_width'] end if attributes.key?(:'environment_selection_strategy') self.environment_selection_strategy = attributes[:'environment_selection_strategy'] end if attributes.key?(:'customer_email_address') self.customer_email_address = attributes[:'customer_email_address'] end if attributes.key?(:'window_height') self.window_height = attributes[:'window_height'] end if attributes.key?(:'tokenization_mode') self.tokenization_mode = attributes[:'tokenization_mode'] end if attributes.key?(:'authorization_timeout_on') self. = attributes[:'authorization_timeout_on'] end if attributes.key?(:'allowed_payment_method_brands') if (value = attributes[:'allowed_payment_method_brands']).is_a?(Array) self.allowed_payment_method_brands = value end end if attributes.key?(:'created_on') self.created_on = attributes[:'created_on'] end if attributes.key?(:'meta_data') if (value = attributes[:'meta_data']).is_a?(Hash) self. = value end end if attributes.key?(:'emails_disabled') self.emails_disabled = attributes[:'emails_disabled'] end if attributes.key?(:'user_interface_type') self.user_interface_type = attributes[:'user_interface_type'] end if attributes.key?(:'customer_id') self.customer_id = attributes[:'customer_id'] end if attributes.key?(:'currency') self.currency = attributes[:'currency'] end if attributes.key?(:'merchant_reference') self.merchant_reference = attributes[:'merchant_reference'] end if attributes.key?(:'authorization_sales_channel') self. = attributes[:'authorization_sales_channel'] end if attributes.key?(:'years_to_keep') self.years_to_keep = attributes[:'years_to_keep'] end if attributes.key?(:'completed_amount') self.completed_amount = attributes[:'completed_amount'] end if attributes.key?(:'screen_height') self.screen_height = attributes[:'screen_height'] end if attributes.key?(:'internet_protocol_address') self.internet_protocol_address = attributes[:'internet_protocol_address'] end if attributes.key?(:'terminal') self.terminal = attributes[:'terminal'] end if attributes.key?(:'end_of_life') self.end_of_life = attributes[:'end_of_life'] end if attributes.key?(:'token') self.token = attributes[:'token'] end if attributes.key?(:'environment') self.environment = attributes[:'environment'] end if attributes.key?(:'screen_color_depth') self.screen_color_depth = attributes[:'screen_color_depth'] end if attributes.key?(:'created_by') self.created_by = attributes[:'created_by'] end if attributes.key?(:'completed_on') self.completed_on = attributes[:'completed_on'] end if attributes.key?(:'completion_timeout_on') self.completion_timeout_on = attributes[:'completion_timeout_on'] end if attributes.key?(:'shipping_address') self.shipping_address = attributes[:'shipping_address'] end if attributes.key?(:'billing_address') self.billing_address = attributes[:'billing_address'] end if attributes.key?(:'authorized_on') self. = attributes[:'authorized_on'] end if attributes.key?(:'failed_url') self.failed_url = attributes[:'failed_url'] end end |
Instance Attribute Details
#accept_header ⇒ Object
The ‘Accept’ header of the customer’s web browser.
79 80 81 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 79 def accept_header @accept_header end |
#accept_language_header ⇒ Object
The ‘Accept Language’ header of the customer’s web browser.
52 53 54 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 52 def accept_language_header @accept_language_header end |
#allowed_payment_method_brands ⇒ Object
The payment method brands that can be used to authorize the transaction.
154 155 156 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 154 def allowed_payment_method_brands @allowed_payment_method_brands end |
#allowed_payment_method_configurations ⇒ Object
The payment method configurations that can be used to authorize the transaction.
71 72 73 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 71 def allowed_payment_method_configurations @allowed_payment_method_configurations end |
#authorization_amount ⇒ Object
The sum of all line item prices including taxes in the transaction’s currency.
135 136 137 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 135 def @authorization_amount end |
#authorization_environment ⇒ Object
Returns the value of attribute authorization_environment.
116 117 118 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 116 def @authorization_environment end |
#authorization_sales_channel ⇒ Object
The sales channel through which the transaction was placed.
177 178 179 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 177 def @authorization_sales_channel end |
#authorization_timeout_on ⇒ Object
The date and time when the transaction must be authorized, otherwise it will canceled.
151 152 153 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 151 def @authorization_timeout_on end |
#authorized_on ⇒ Object
The date and time when the transaction was authorized.
217 218 219 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 217 def @authorized_on end |
#auto_confirmation_enabled ⇒ Object
Whether the transaction can be confirmed automatically or whether this must be done explicitly via the API. Default is true.
119 120 121 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 119 def auto_confirmation_enabled @auto_confirmation_enabled end |
#billing_address ⇒ Object
Returns the value of attribute billing_address.
214 215 216 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 214 def billing_address @billing_address end |
#charge_retry_enabled ⇒ Object
Whether the customer can make further payment attempts if the first one has failed. Default is true.
76 77 78 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 76 def charge_retry_enabled @charge_retry_enabled end |
#completed_amount ⇒ Object
The total amount that was completed, in the transaction’s currency.
183 184 185 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 183 def completed_amount @completed_amount end |
#completed_on ⇒ Object
The date and time when the transaction was completed.
207 208 209 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 207 def completed_on @completed_on end |
#completion_behavior ⇒ Object
Returns the value of attribute completion_behavior.
102 103 104 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 102 def completion_behavior @completion_behavior end |
#completion_timeout_on ⇒ Object
The date and time when the transaction is completed automatically.
210 211 212 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 210 def completion_timeout_on @completion_timeout_on end |
#confirmed_by ⇒ Object
The ID of the user the transaction was confirmed by.
58 59 60 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 58 def confirmed_by @confirmed_by end |
#confirmed_on ⇒ Object
The date and time when the transaction was created.
46 47 48 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 46 def confirmed_on @confirmed_on end |
#created_by ⇒ Object
The ID of the user the transaction was created by.
204 205 206 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 204 def created_by @created_by end |
#created_on ⇒ Object
The date and time when the object was created.
157 158 159 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 157 def created_on @created_on end |
#currency ⇒ Object
The three-letter code (ISO 4217 format) of the transaction’s currency.
171 172 173 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 171 def currency @currency end |
#customer_email_address ⇒ Object
The customer’s email address.
143 144 145 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 143 def customer_email_address @customer_email_address end |
#customer_id ⇒ Object
The unique identifier of the customer in the external system.
168 169 170 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 168 def customer_id @customer_id end |
#customers_presence ⇒ Object
Returns the value of attribute customers_presence.
126 127 128 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 126 def customers_presence @customers_presence end |
#delivery_decision_made_on ⇒ Object
This date and time when the decision was made as to whether the order should be shipped.
114 115 116 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 114 def delivery_decision_made_on @delivery_decision_made_on end |
#device_session_identifier ⇒ Object
Allows to link the transaction to the data collected from the customer’s device.
34 35 36 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 34 def device_session_identifier @device_session_identifier end |
#emails_disabled ⇒ Object
Whether email sending is deactivated for the transaction. Default is false.
163 164 165 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 163 def emails_disabled @emails_disabled end |
#end_of_life ⇒ Object
The date and time when the transaction reaches its end of live. No further actions can be carried out at this time.
194 195 196 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 194 def end_of_life @end_of_life end |
#environment ⇒ Object
Returns the value of attribute environment.
198 199 200 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 198 def environment @environment end |
#environment_selection_strategy ⇒ Object
Returns the value of attribute environment_selection_strategy.
140 141 142 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 140 def environment_selection_strategy @environment_selection_strategy end |
#failed_on ⇒ Object
The date and time when the transaction failed.
129 130 131 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 129 def failed_on @failed_on end |
#failed_url ⇒ Object
The URL to redirect the customer back to after they canceled or failed to authenticated their payment.
220 221 222 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 220 def failed_url @failed_url end |
#failure_reason ⇒ Object
Returns the value of attribute failure_reason.
121 122 123 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 121 def failure_reason @failure_reason end |
#group ⇒ Object
Returns the value of attribute group.
73 74 75 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 73 def group @group end |
#id ⇒ Object
A unique identifier for the object.
63 64 65 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 63 def id @id end |
#internet_protocol_address ⇒ Object
The IP address of the customer’s device.
189 190 191 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 189 def internet_protocol_address @internet_protocol_address end |
#internet_protocol_address_country ⇒ Object
The country determined from the IP address of the customer’s device.
108 109 110 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 108 def internet_protocol_address_country @internet_protocol_address_country end |
#invoice_merchant_reference ⇒ Object
The merchant’s reference used to identify the invoice.
40 41 42 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 40 def invoice_merchant_reference @invoice_merchant_reference end |
#java_enabled ⇒ Object
Whether Java is enabled on the customer’s web browser.
55 56 57 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 55 def java_enabled @java_enabled end |
#language ⇒ Object
The language that is linked to the object.
43 44 45 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 43 def language @language end |
#line_items ⇒ Object
The line items purchased by the customer.
49 50 51 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 49 def line_items @line_items end |
#linked_space_id ⇒ Object
The ID of the space this object belongs to.
111 112 113 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 111 def linked_space_id @linked_space_id end |
#merchant_reference ⇒ Object
The merchant’s reference used to identify the transaction.
174 175 176 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 174 def merchant_reference @merchant_reference end |
#meta_data ⇒ Object
Allow to store additional information about the object.
160 161 162 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 160 def @meta_data end |
#parent ⇒ Object
Returns the value of attribute parent.
28 29 30 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 28 def parent @parent end |
#payment_connector_configuration ⇒ Object
Returns the value of attribute payment_connector_configuration.
60 61 62 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 60 def payment_connector_configuration @payment_connector_configuration end |
#planned_purge_date ⇒ Object
The date and time when the object is planned to be permanently removed. If the value is empty, the object will not be removed.
88 89 90 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 88 def planned_purge_date @planned_purge_date end |
#processing_on ⇒ Object
The date and time when the processing of the transaction was started.
37 38 39 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 37 def processing_on @processing_on end |
#refunded_amount ⇒ Object
The total amount that was refunded, in the transaction’s currency.
132 133 134 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 132 def refunded_amount @refunded_amount end |
#screen_color_depth ⇒ Object
The screen color depth of the customer’s web browser.
201 202 203 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 201 def screen_color_depth @screen_color_depth end |
#screen_height ⇒ Object
The screen height of the customer’s web browser.
186 187 188 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 186 def screen_height @screen_height end |
#screen_width ⇒ Object
The screen width of the customer’s web browser.
138 139 140 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 138 def screen_width @screen_width end |
#shipping_address ⇒ Object
Returns the value of attribute shipping_address.
212 213 214 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 212 def shipping_address @shipping_address end |
#shipping_method ⇒ Object
The name of the shipping method used to ship the products.
85 86 87 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 85 def shipping_method @shipping_method end |
#space_view_id ⇒ Object
The ID of the space view this object is linked to.
97 98 99 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 97 def space_view_id @space_view_id end |
#state ⇒ Object
Returns the value of attribute state.
65 66 67 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 65 def state @state end |
#success_url ⇒ Object
The URL to redirect the customer back to after they successfully authenticated their payment.
91 92 93 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 91 def success_url @success_url end |
#terminal ⇒ Object
Returns the value of attribute terminal.
191 192 193 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 191 def terminal @terminal end |
#time_zone ⇒ Object
The customer’s time zone, which affects how dates and times are formatted when communicating with the customer.
94 95 96 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 94 def time_zone @time_zone end |
#token ⇒ Object
Returns the value of attribute token.
196 197 198 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 196 def token @token end |
#tokenization_mode ⇒ Object
Returns the value of attribute tokenization_mode.
148 149 150 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 148 def tokenization_mode @tokenization_mode end |
#total_applied_fees ⇒ Object
The total of all fees charged, in the transaction’s currency.
124 125 126 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 124 def total_applied_fees @total_applied_fees end |
#total_settled_amount ⇒ Object
The total amount that was settled, in the transaction’s currency.
31 32 33 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 31 def total_settled_amount @total_settled_amount end |
#user_agent_header ⇒ Object
The ‘User Agent’ header of the customer’s web browser.
82 83 84 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 82 def user_agent_header @user_agent_header end |
#user_failure_message ⇒ Object
The message that can be displayed to the customer explaining why the transaction failed, in the customer’s language.
100 101 102 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 100 def @user_failure_message end |
#user_interface_type ⇒ Object
Returns the value of attribute user_interface_type.
165 166 167 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 165 def user_interface_type @user_interface_type end |
#version ⇒ Object
The version is used for optimistic locking and incremented whenever the object is updated.
105 106 107 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 105 def version @version end |
#window_height ⇒ Object
The window height of the customer’s web browser.
146 147 148 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 146 def window_height @window_height end |
#window_width ⇒ Object
The window width of the customer’s web browser.
68 69 70 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 68 def window_width @window_width end |
#years_to_keep ⇒ Object
The number of years the transaction is kept after its authorization.
180 181 182 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 180 def years_to_keep @years_to_keep end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 1041 def self._deserialize(type, value) case type.to_sym when :Time Time.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 # models (e.g. Pet) or oneOf klass = PostfinancecheckoutRubySdk.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
321 322 323 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 321 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
326 327 328 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 326 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 308 309 310 311 312 313 314 315 316 317 318 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 245 def self.attribute_map { :'parent' => :'parent', :'total_settled_amount' => :'totalSettledAmount', :'device_session_identifier' => :'deviceSessionIdentifier', :'processing_on' => :'processingOn', :'invoice_merchant_reference' => :'invoiceMerchantReference', :'language' => :'language', :'confirmed_on' => :'confirmedOn', :'line_items' => :'lineItems', :'accept_language_header' => :'acceptLanguageHeader', :'java_enabled' => :'javaEnabled', :'confirmed_by' => :'confirmedBy', :'payment_connector_configuration' => :'paymentConnectorConfiguration', :'id' => :'id', :'state' => :'state', :'window_width' => :'windowWidth', :'allowed_payment_method_configurations' => :'allowedPaymentMethodConfigurations', :'group' => :'group', :'charge_retry_enabled' => :'chargeRetryEnabled', :'accept_header' => :'acceptHeader', :'user_agent_header' => :'userAgentHeader', :'shipping_method' => :'shippingMethod', :'planned_purge_date' => :'plannedPurgeDate', :'success_url' => :'successUrl', :'time_zone' => :'timeZone', :'space_view_id' => :'spaceViewId', :'user_failure_message' => :'userFailureMessage', :'completion_behavior' => :'completionBehavior', :'version' => :'version', :'internet_protocol_address_country' => :'internetProtocolAddressCountry', :'linked_space_id' => :'linkedSpaceId', :'delivery_decision_made_on' => :'deliveryDecisionMadeOn', :'authorization_environment' => :'authorizationEnvironment', :'auto_confirmation_enabled' => :'autoConfirmationEnabled', :'failure_reason' => :'failureReason', :'total_applied_fees' => :'totalAppliedFees', :'customers_presence' => :'customersPresence', :'failed_on' => :'failedOn', :'refunded_amount' => :'refundedAmount', :'authorization_amount' => :'authorizationAmount', :'screen_width' => :'screenWidth', :'environment_selection_strategy' => :'environmentSelectionStrategy', :'customer_email_address' => :'customerEmailAddress', :'window_height' => :'windowHeight', :'tokenization_mode' => :'tokenizationMode', :'authorization_timeout_on' => :'authorizationTimeoutOn', :'allowed_payment_method_brands' => :'allowedPaymentMethodBrands', :'created_on' => :'createdOn', :'meta_data' => :'metaData', :'emails_disabled' => :'emailsDisabled', :'user_interface_type' => :'userInterfaceType', :'customer_id' => :'customerId', :'currency' => :'currency', :'merchant_reference' => :'merchantReference', :'authorization_sales_channel' => :'authorizationSalesChannel', :'years_to_keep' => :'yearsToKeep', :'completed_amount' => :'completedAmount', :'screen_height' => :'screenHeight', :'internet_protocol_address' => :'internetProtocolAddress', :'terminal' => :'terminal', :'end_of_life' => :'endOfLife', :'token' => :'token', :'environment' => :'environment', :'screen_color_depth' => :'screenColorDepth', :'created_by' => :'createdBy', :'completed_on' => :'completedOn', :'completion_timeout_on' => :'completionTimeoutOn', :'shipping_address' => :'shippingAddress', :'billing_address' => :'billingAddress', :'authorized_on' => :'authorizedOn', :'failed_url' => :'failedUrl' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 1017 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif 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[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
407 408 409 410 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 407 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 331 def self.openapi_types { :'parent' => :'Transaction', :'total_settled_amount' => :'Float', :'device_session_identifier' => :'String', :'processing_on' => :'Time', :'invoice_merchant_reference' => :'String', :'language' => :'String', :'confirmed_on' => :'Time', :'line_items' => :'Array<LineItem>', :'accept_language_header' => :'String', :'java_enabled' => :'Boolean', :'confirmed_by' => :'Integer', :'payment_connector_configuration' => :'PaymentConnectorConfiguration', :'id' => :'Integer', :'state' => :'TransactionState', :'window_width' => :'String', :'allowed_payment_method_configurations' => :'Array<Integer>', :'group' => :'TransactionGroup', :'charge_retry_enabled' => :'Boolean', :'accept_header' => :'String', :'user_agent_header' => :'String', :'shipping_method' => :'String', :'planned_purge_date' => :'Time', :'success_url' => :'String', :'time_zone' => :'String', :'space_view_id' => :'Integer', :'user_failure_message' => :'String', :'completion_behavior' => :'TransactionCompletionBehavior', :'version' => :'Integer', :'internet_protocol_address_country' => :'String', :'linked_space_id' => :'Integer', :'delivery_decision_made_on' => :'Time', :'authorization_environment' => :'ChargeAttemptEnvironment', :'auto_confirmation_enabled' => :'Boolean', :'failure_reason' => :'FailureReason', :'total_applied_fees' => :'Float', :'customers_presence' => :'CustomersPresence', :'failed_on' => :'Time', :'refunded_amount' => :'Float', :'authorization_amount' => :'Float', :'screen_width' => :'String', :'environment_selection_strategy' => :'TransactionEnvironmentSelectionStrategy', :'customer_email_address' => :'String', :'window_height' => :'String', :'tokenization_mode' => :'TokenizationMode', :'authorization_timeout_on' => :'Time', :'allowed_payment_method_brands' => :'Array<Integer>', :'created_on' => :'Time', :'meta_data' => :'Hash<String, String>', :'emails_disabled' => :'Boolean', :'user_interface_type' => :'TransactionUserInterfaceType', :'customer_id' => :'String', :'currency' => :'String', :'merchant_reference' => :'String', :'authorization_sales_channel' => :'Integer', :'years_to_keep' => :'Integer', :'completed_amount' => :'Float', :'screen_height' => :'String', :'internet_protocol_address' => :'String', :'terminal' => :'PaymentTerminal', :'end_of_life' => :'Time', :'token' => :'Token', :'environment' => :'Environment', :'screen_color_depth' => :'String', :'created_by' => :'Integer', :'completed_on' => :'Time', :'completion_timeout_on' => :'Time', :'shipping_address' => :'Address', :'billing_address' => :'Address', :'authorized_on' => :'Time', :'failed_url' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
927 928 929 930 931 932 933 934 935 936 937 938 939 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 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 927 def ==(o) return true if self.equal?(o) self.class == o.class && parent == o.parent && total_settled_amount == o.total_settled_amount && device_session_identifier == o.device_session_identifier && processing_on == o.processing_on && invoice_merchant_reference == o.invoice_merchant_reference && language == o.language && confirmed_on == o.confirmed_on && line_items == o.line_items && accept_language_header == o.accept_language_header && java_enabled == o.java_enabled && confirmed_by == o.confirmed_by && payment_connector_configuration == o.payment_connector_configuration && id == o.id && state == o.state && window_width == o.window_width && allowed_payment_method_configurations == o.allowed_payment_method_configurations && group == o.group && charge_retry_enabled == o.charge_retry_enabled && accept_header == o.accept_header && user_agent_header == o.user_agent_header && shipping_method == o.shipping_method && planned_purge_date == o.planned_purge_date && success_url == o.success_url && time_zone == o.time_zone && space_view_id == o.space_view_id && == o. && completion_behavior == o.completion_behavior && version == o.version && internet_protocol_address_country == o.internet_protocol_address_country && linked_space_id == o.linked_space_id && delivery_decision_made_on == o.delivery_decision_made_on && == o. && auto_confirmation_enabled == o.auto_confirmation_enabled && failure_reason == o.failure_reason && total_applied_fees == o.total_applied_fees && customers_presence == o.customers_presence && failed_on == o.failed_on && refunded_amount == o.refunded_amount && == o. && screen_width == o.screen_width && environment_selection_strategy == o.environment_selection_strategy && customer_email_address == o.customer_email_address && window_height == o.window_height && tokenization_mode == o.tokenization_mode && == o. && allowed_payment_method_brands == o.allowed_payment_method_brands && created_on == o.created_on && == o. && emails_disabled == o.emails_disabled && user_interface_type == o.user_interface_type && customer_id == o.customer_id && currency == o.currency && merchant_reference == o.merchant_reference && == o. && years_to_keep == o.years_to_keep && completed_amount == o.completed_amount && screen_height == o.screen_height && internet_protocol_address == o.internet_protocol_address && terminal == o.terminal && end_of_life == o.end_of_life && token == o.token && environment == o.environment && screen_color_depth == o.screen_color_depth && created_by == o.created_by && completed_on == o.completed_on && completion_timeout_on == o.completion_timeout_on && shipping_address == o.shipping_address && billing_address == o.billing_address && == o. && failed_url == o.failed_url end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 1112 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 |
#eql?(o) ⇒ Boolean
1004 1005 1006 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 1004 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
1010 1011 1012 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 1010 def hash [parent, total_settled_amount, device_session_identifier, processing_on, invoice_merchant_reference, language, confirmed_on, line_items, accept_language_header, java_enabled, confirmed_by, payment_connector_configuration, id, state, window_width, allowed_payment_method_configurations, group, charge_retry_enabled, accept_header, user_agent_header, shipping_method, planned_purge_date, success_url, time_zone, space_view_id, , completion_behavior, version, internet_protocol_address_country, linked_space_id, delivery_decision_made_on, , auto_confirmation_enabled, failure_reason, total_applied_fees, customers_presence, failed_on, refunded_amount, , screen_width, environment_selection_strategy, customer_email_address, window_height, tokenization_mode, , allowed_payment_method_brands, created_on, , emails_disabled, user_interface_type, customer_id, currency, merchant_reference, , years_to_keep, completed_amount, screen_height, internet_protocol_address, terminal, end_of_life, token, environment, screen_color_depth, created_by, completed_on, completion_timeout_on, shipping_address, billing_address, , failed_url].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 719 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new 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 pattern = Regexp.new(/([a-zA-Z0-9_-])*/) if !@device_session_identifier.nil? && @device_session_identifier !~ pattern invalid_properties.push("invalid value for \"device_session_identifier\", must conform to the pattern #{pattern}.") 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 pattern = Regexp.new(/[ \x20-\x7e]*/) if !@invoice_merchant_reference.nil? && @invoice_merchant_reference !~ pattern invalid_properties.push("invalid value for \"invoice_merchant_reference\", must conform to the pattern #{pattern}.") 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 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 !@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 pattern = Regexp.new(/[ \x20-\x7e]*/) if !@merchant_reference.nil? && @merchant_reference !~ pattern invalid_properties.push("invalid value for \"merchant_reference\", must conform to the pattern #{pattern}.") 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 invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
1088 1089 1090 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 1088 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 1094 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
1082 1083 1084 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 1082 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 |
# File 'lib/postfinancecheckout-ruby-sdk/models/transaction.rb', line 782 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' 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 !@device_session_identifier.nil? && @device_session_identifier !~ Regexp.new(/([a-zA-Z0-9_-])*/) return false if !@invoice_merchant_reference.nil? && @invoice_merchant_reference.to_s.length > 100 return false if !@invoice_merchant_reference.nil? && @invoice_merchant_reference !~ Regexp.new(/[ \x20-\x7e]*/) 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 return false if !@customer_email_address.nil? && @customer_email_address.to_s.length > 254 return false if !@merchant_reference.nil? && @merchant_reference.to_s.length > 100 return false if !@merchant_reference.nil? && @merchant_reference !~ Regexp.new(/[ \x20-\x7e]*/) return false if !@failed_url.nil? && @failed_url.to_s.length > 2000 return false if !@failed_url.nil? && @failed_url.to_s.length < 9 true end |