Class: CyberSourceMergedSpec::PaymentInformation
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::PaymentInformation
- Defined in:
- lib/cyber_source_merged_spec/models/payment_information.rb
Overview
PaymentInformation Model.
Instance Attribute Summary collapse
-
#bank ⇒ Bank
TODO: Write general description for this method.
-
#card ⇒ Card
TODO: Write general description for this method.
-
#customer ⇒ Customer
TODO: Write general description for this method.
-
#direct_debit ⇒ DirectDebit
TODO: Write general description for this method.
-
#e_wallet ⇒ EWallet
Mastercard-defined code that indicates how the account information was obtained.
-
#fluid_data ⇒ FluidData
TODO: Write general description for this method.
-
#initiation_channel ⇒ String
Mastercard-defined code that indicates how the account information was obtained.
-
#instrument_identifier ⇒ InstrumentIdentifier
TODO: Write general description for this method.
-
#legacy_token ⇒ LegacyToken
TODO: Write general description for this method.
-
#merchant_limited_acceptance_indicator ⇒ String
Mastercard One Credential merchant limited acceptance indicator.
-
#options ⇒ Options
TODO: Write general description for this method.
-
#payment_account_reference ⇒ PaymentAccountReference
Mastercard-defined code that indicates how the account information was obtained.
-
#payment_instrument ⇒ PaymentInstrument
TODO: Write general description for this method.
-
#payment_type ⇒ PaymentType
TODO: Write general description for this method.
-
#sepa ⇒ Sepa
Mastercard-defined code that indicates how the account information was obtained.
-
#shipping_address ⇒ ShippingAddress
TODO: Write general description for this method.
-
#third_party_token ⇒ ThirdPartyToken
Mastercard-defined code that indicates how the account information was obtained.
-
#tokenized_card ⇒ TokenizedCard
TODO: Write general description for this method.
-
#tokenized_payment_method ⇒ TokenizedPaymentMethod
TODO: Write general description for this method.
Class Method Summary collapse
- .from_element(root) ⇒ Object
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(card: SKIP, tokenized_card: SKIP, tokenized_payment_method: SKIP, direct_debit: SKIP, fluid_data: SKIP, customer: SKIP, payment_instrument: SKIP, instrument_identifier: SKIP, shipping_address: SKIP, legacy_token: SKIP, bank: SKIP, options: SKIP, payment_type: SKIP, initiation_channel: SKIP, sepa: SKIP, e_wallet: SKIP, payment_account_reference: SKIP, third_party_token: SKIP, merchant_limited_acceptance_indicator: SKIP, additional_properties: nil) ⇒ PaymentInformation
constructor
A new instance of PaymentInformation.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
- #to_xml_element(doc, root_name) ⇒ Object
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(card: SKIP, tokenized_card: SKIP, tokenized_payment_method: SKIP, direct_debit: SKIP, fluid_data: SKIP, customer: SKIP, payment_instrument: SKIP, instrument_identifier: SKIP, shipping_address: SKIP, legacy_token: SKIP, bank: SKIP, options: SKIP, payment_type: SKIP, initiation_channel: SKIP, sepa: SKIP, e_wallet: SKIP, payment_account_reference: SKIP, third_party_token: SKIP, merchant_limited_acceptance_indicator: SKIP, additional_properties: nil) ⇒ PaymentInformation
Returns a new instance of PaymentInformation.
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 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 482 def initialize(card: SKIP, tokenized_card: SKIP, tokenized_payment_method: SKIP, direct_debit: SKIP, fluid_data: SKIP, customer: SKIP, payment_instrument: SKIP, instrument_identifier: SKIP, shipping_address: SKIP, legacy_token: SKIP, bank: SKIP, options: SKIP, payment_type: SKIP, initiation_channel: SKIP, sepa: SKIP, e_wallet: SKIP, payment_account_reference: SKIP, third_party_token: SKIP, merchant_limited_acceptance_indicator: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @card = card unless card == SKIP @tokenized_card = tokenized_card unless tokenized_card == SKIP @tokenized_payment_method = tokenized_payment_method unless tokenized_payment_method == SKIP @direct_debit = direct_debit unless direct_debit == SKIP @fluid_data = fluid_data unless fluid_data == SKIP @customer = customer unless customer == SKIP @payment_instrument = payment_instrument unless payment_instrument == SKIP @instrument_identifier = instrument_identifier unless instrument_identifier == SKIP @shipping_address = shipping_address unless shipping_address == SKIP @legacy_token = legacy_token unless legacy_token == SKIP @bank = bank unless bank == SKIP @options = unless == SKIP @payment_type = payment_type unless payment_type == SKIP @initiation_channel = initiation_channel unless initiation_channel == SKIP @sepa = sepa unless sepa == SKIP @e_wallet = e_wallet unless e_wallet == SKIP unless payment_account_reference == SKIP @payment_account_reference = payment_account_reference end @third_party_token = third_party_token unless third_party_token == SKIP unless merchant_limited_acceptance_indicator == SKIP @merchant_limited_acceptance_indicator = merchant_limited_acceptance_indicator end @additional_properties = additional_properties end |
Instance Attribute Details
#bank ⇒ Bank
TODO: Write general description for this method
54 55 56 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 54 def bank @bank end |
#card ⇒ Card
TODO: Write general description for this method
14 15 16 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 14 def card @card end |
#customer ⇒ Customer
TODO: Write general description for this method
34 35 36 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 34 def customer @customer end |
#direct_debit ⇒ DirectDebit
TODO: Write general description for this method
26 27 28 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 26 def direct_debit @direct_debit end |
#e_wallet ⇒ EWallet
Mastercard-defined code that indicates how the account information was obtained.
00: Card01: Mobile Network Operator (MNO) controlled removable secure element (SIM or UICC) personalized for use with a mobile phone or smartphone02: Key fob03: Watch using a contactless chip or a fixed (non-removable) secure element not controlled by the MNO04: Mobile tag05: Wristband06: Mobile phone case or sleeve07: Mobile phone or smartphone with a fixed (non-removable) secure element controlled by the MNO,for example, code division multiple access (CDMA)08: Removable secure element not controlled by the MNO, for example, memory card personalized forused with a mobile phone or smartphone09: Mobile Phone or smartphone with a fixed (non-removable) secure element not controlled by the MNO10: MNO controlled removable secure element (SIM or UICC) personalized for use with a tablet or e-book11: Tablet or e-book with a fixed (non-removable) secure element controlled by the MNO12: Removable secure element not controlled by the MNO, for example, memory card personalized foruse with a tablet or e-book13: Tablet or e-book with fixed (non-removable) secure element not controlled by the MNO14: Mobile phone or smartphone with a payment application running in a host processor15: Tablet or e-book with a payment application running in a host processor16: Mobile phone or smartphone with a payment application running in the Trusted ExecutionEnvironment (TEE) of a host processor17: Tablet or e-book with a payment application running in the TEE of a host processor18: Watch with a payment application running in the TEE of a host processor19: Watch with a payment application running in a host processor Values from 20–99 exclusively indicate the form factor only without also indicating the storage technology20: Card21: Phone e.g. Mobile Phone22: Tablet/e-reader23: Watch/Wristband e.g. Watch or wristband, including a fitness band, smart strap, disposable band, watch add-on, and security/ID band24: Sticker25: PC26: Device Peripheral e.g. mobile phone case or sleeve27: Tag e.g. key fob or mobile tag28: Jewelry e.g. ring, bracelet, necklace and cuff links29: Fashion Accessory e.g. handbag, bag charm and glasses30: Garment e.g. dress31: Domestic Appliance e.g refrigerator, washing machine32: Vehicle e.g. vehicle, including vehicle attached devices33: Media/Gaming Device e.g. media or gaming device, including a set top box, media player and television 34–99 are reserved for future form factors. Any value in this range may occur within form factor and transaction data without prior notice. This field is supported only for Mastercard on CyberSource through VisaNet. When initiation channel is not provided via this API field, the value is extracted from EMV tag 9F6E for Mastercard transactions. To enable this feature please call support.
Used by
Authorization Optional field.
266 267 268 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 266 def e_wallet @e_wallet end |
#fluid_data ⇒ FluidData
TODO: Write general description for this method
30 31 32 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 30 def fluid_data @fluid_data end |
#initiation_channel ⇒ String
Mastercard-defined code that indicates how the account information was obtained.
00: Card01: Mobile Network Operator (MNO) controlled removable secure element (SIM or UICC) personalized for use with a mobile phone or smartphone02: Key fob03: Watch using a contactless chip or a fixed (non-removable) secure element not controlled by the MNO04: Mobile tag05: Wristband06: Mobile phone case or sleeve07: Mobile phone or smartphone with a fixed (non-removable) secure element controlled by the MNO,for example, code division multiple access (CDMA)08: Removable secure element not controlled by the MNO, for example, memory card personalized forused with a mobile phone or smartphone09: Mobile Phone or smartphone with a fixed (non-removable) secure element not controlled by the MNO10: MNO controlled removable secure element (SIM or UICC) personalized for use with a tablet or e-book11: Tablet or e-book with a fixed (non-removable) secure element controlled by the MNO12: Removable secure element not controlled by the MNO, for example, memory card personalized foruse with a tablet or e-book13: Tablet or e-book with fixed (non-removable) secure element not controlled by the MNO14: Mobile phone or smartphone with a payment application running in a host processor15: Tablet or e-book with a payment application running in a host processor16: Mobile phone or smartphone with a payment application running in the Trusted ExecutionEnvironment (TEE) of a host processor17: Tablet or e-book with a payment application running in the TEE of a host processor18: Watch with a payment application running in the TEE of a host processor19: Watch with a payment application running in a host processor Values from 20–99 exclusively indicate the form factor only without also indicating the storage technology20: Card21: Phone e.g. Mobile Phone22: Tablet/e-reader23: Watch/Wristband e.g. Watch or wristband, including a fitness band, smart strap, disposable band, watch add-on, and security/ID band24: Sticker25: PC26: Device Peripheral e.g. mobile phone case or sleeve27: Tag e.g. key fob or mobile tag28: Jewelry e.g. ring, bracelet, necklace and cuff links29: Fashion Accessory e.g. handbag, bag charm and glasses30: Garment e.g. dress31: Domestic Appliance e.g refrigerator, washing machine32: Vehicle e.g. vehicle, including vehicle attached devices33: Media/Gaming Device e.g. media or gaming device, including a set top box, media player and television 34–99 are reserved for future form factors. Any value in this range may occur within form factor and transaction data without prior notice. This field is supported only for Mastercard on CyberSource through VisaNet. When initiation channel is not provided via this API field, the value is extracted from EMV tag 9F6E for Mastercard transactions. To enable this feature please call support.
Used by
Authorization Optional field.
130 131 132 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 130 def initiation_channel @initiation_channel end |
#instrument_identifier ⇒ InstrumentIdentifier
TODO: Write general description for this method
42 43 44 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 42 def instrument_identifier @instrument_identifier end |
#legacy_token ⇒ LegacyToken
TODO: Write general description for this method
50 51 52 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 50 def legacy_token @legacy_token end |
#merchant_limited_acceptance_indicator ⇒ String
Mastercard One Credential merchant limited acceptance indicator. Mastercard One Credential connects multiple Mastercard payment methods and allows cardhollers to access various options and set payment preferences. This field indicates which Mastercard One Credential funding PAN acceptance brands should NOT be assigned for this transaction. This field flows in ISO field 34, DSID 02 tag DB, mapped to Mastercard Data Element (DE) 48, Sub element 02, Subfield 01. Possible values:
C: Do not assign a Mastercard One Credential funding PAN containing the Mastercard Credit Acceptance Brand for this transactionD: Do not assign a Mastercard One Credential funding PAN containing the Debit Mastercard Acceptance Brand for this transactionM: Do not assign a Mastercard One Credential funding PAN containing the Maestro Acceptance Brand for this transaction This field is supported for all flavors of Authorization request only. Will not be received in response.
Used by
Authorization Request Optional field.
424 425 426 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 424 def merchant_limited_acceptance_indicator @merchant_limited_acceptance_indicator end |
#options ⇒ Options
TODO: Write general description for this method
58 59 60 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 58 def @options end |
#payment_account_reference ⇒ PaymentAccountReference
Mastercard-defined code that indicates how the account information was obtained.
00: Card01: Mobile Network Operator (MNO) controlled removable secure element (SIM or UICC) personalized for use with a mobile phone or smartphone02: Key fob03: Watch using a contactless chip or a fixed (non-removable) secure element not controlled by the MNO04: Mobile tag05: Wristband06: Mobile phone case or sleeve07: Mobile phone or smartphone with a fixed (non-removable) secure element controlled by the MNO,for example, code division multiple access (CDMA)08: Removable secure element not controlled by the MNO, for example, memory card personalized forused with a mobile phone or smartphone09: Mobile Phone or smartphone with a fixed (non-removable) secure element not controlled by the MNO10: MNO controlled removable secure element (SIM or UICC) personalized for use with a tablet or e-book11: Tablet or e-book with a fixed (non-removable) secure element controlled by the MNO12: Removable secure element not controlled by the MNO, for example, memory card personalized foruse with a tablet or e-book13: Tablet or e-book with fixed (non-removable) secure element not controlled by the MNO14: Mobile phone or smartphone with a payment application running in a host processor15: Tablet or e-book with a payment application running in a host processor16: Mobile phone or smartphone with a payment application running in the Trusted ExecutionEnvironment (TEE) of a host processor17: Tablet or e-book with a payment application running in the TEE of a host processor18: Watch with a payment application running in the TEE of a host processor19: Watch with a payment application running in a host processor Values from 20–99 exclusively indicate the form factor only without also indicating the storage technology20: Card21: Phone e.g. Mobile Phone22: Tablet/e-reader23: Watch/Wristband e.g. Watch or wristband, including a fitness band, smart strap, disposable band, watch add-on, and security/ID band24: Sticker25: PC26: Device Peripheral e.g. mobile phone case or sleeve27: Tag e.g. key fob or mobile tag28: Jewelry e.g. ring, bracelet, necklace and cuff links29: Fashion Accessory e.g. handbag, bag charm and glasses30: Garment e.g. dress31: Domestic Appliance e.g refrigerator, washing machine32: Vehicle e.g. vehicle, including vehicle attached devices33: Media/Gaming Device e.g. media or gaming device, including a set top box, media player and television 34–99 are reserved for future form factors. Any value in this range may occur within form factor and transaction data without prior notice. This field is supported only for Mastercard on CyberSource through VisaNet. When initiation channel is not provided via this API field, the value is extracted from EMV tag 9F6E for Mastercard transactions. To enable this feature please call support.
Used by
Authorization Optional field.
334 335 336 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 334 def payment_account_reference @payment_account_reference end |
#payment_instrument ⇒ PaymentInstrument
TODO: Write general description for this method
38 39 40 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 38 def payment_instrument @payment_instrument end |
#payment_type ⇒ PaymentType
TODO: Write general description for this method
62 63 64 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 62 def payment_type @payment_type end |
#sepa ⇒ Sepa
Mastercard-defined code that indicates how the account information was obtained.
00: Card01: Mobile Network Operator (MNO) controlled removable secure element (SIM or UICC) personalized for use with a mobile phone or smartphone02: Key fob03: Watch using a contactless chip or a fixed (non-removable) secure element not controlled by the MNO04: Mobile tag05: Wristband06: Mobile phone case or sleeve07: Mobile phone or smartphone with a fixed (non-removable) secure element controlled by the MNO,for example, code division multiple access (CDMA)08: Removable secure element not controlled by the MNO, for example, memory card personalized forused with a mobile phone or smartphone09: Mobile Phone or smartphone with a fixed (non-removable) secure element not controlled by the MNO10: MNO controlled removable secure element (SIM or UICC) personalized for use with a tablet or e-book11: Tablet or e-book with a fixed (non-removable) secure element controlled by the MNO12: Removable secure element not controlled by the MNO, for example, memory card personalized foruse with a tablet or e-book13: Tablet or e-book with fixed (non-removable) secure element not controlled by the MNO14: Mobile phone or smartphone with a payment application running in a host processor15: Tablet or e-book with a payment application running in a host processor16: Mobile phone or smartphone with a payment application running in the Trusted ExecutionEnvironment (TEE) of a host processor17: Tablet or e-book with a payment application running in the TEE of a host processor18: Watch with a payment application running in the TEE of a host processor19: Watch with a payment application running in a host processor Values from 20–99 exclusively indicate the form factor only without also indicating the storage technology20: Card21: Phone e.g. Mobile Phone22: Tablet/e-reader23: Watch/Wristband e.g. Watch or wristband, including a fitness band, smart strap, disposable band, watch add-on, and security/ID band24: Sticker25: PC26: Device Peripheral e.g. mobile phone case or sleeve27: Tag e.g. key fob or mobile tag28: Jewelry e.g. ring, bracelet, necklace and cuff links29: Fashion Accessory e.g. handbag, bag charm and glasses30: Garment e.g. dress31: Domestic Appliance e.g refrigerator, washing machine32: Vehicle e.g. vehicle, including vehicle attached devices33: Media/Gaming Device e.g. media or gaming device, including a set top box, media player and television 34–99 are reserved for future form factors. Any value in this range may occur within form factor and transaction data without prior notice. This field is supported only for Mastercard on CyberSource through VisaNet. When initiation channel is not provided via this API field, the value is extracted from EMV tag 9F6E for Mastercard transactions. To enable this feature please call support.
Used by
Authorization Optional field.
198 199 200 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 198 def sepa @sepa end |
#shipping_address ⇒ ShippingAddress
TODO: Write general description for this method
46 47 48 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 46 def shipping_address @shipping_address end |
#third_party_token ⇒ ThirdPartyToken
Mastercard-defined code that indicates how the account information was obtained.
00: Card01: Mobile Network Operator (MNO) controlled removable secure element (SIM or UICC) personalized for use with a mobile phone or smartphone02: Key fob03: Watch using a contactless chip or a fixed (non-removable) secure element not controlled by the MNO04: Mobile tag05: Wristband06: Mobile phone case or sleeve07: Mobile phone or smartphone with a fixed (non-removable) secure element controlled by the MNO,for example, code division multiple access (CDMA)08: Removable secure element not controlled by the MNO, for example, memory card personalized forused with a mobile phone or smartphone09: Mobile Phone or smartphone with a fixed (non-removable) secure element not controlled by the MNO10: MNO controlled removable secure element (SIM or UICC) personalized for use with a tablet or e-book11: Tablet or e-book with a fixed (non-removable) secure element controlled by the MNO12: Removable secure element not controlled by the MNO, for example, memory card personalized foruse with a tablet or e-book13: Tablet or e-book with fixed (non-removable) secure element not controlled by the MNO14: Mobile phone or smartphone with a payment application running in a host processor15: Tablet or e-book with a payment application running in a host processor16: Mobile phone or smartphone with a payment application running in the Trusted ExecutionEnvironment (TEE) of a host processor17: Tablet or e-book with a payment application running in the TEE of a host processor18: Watch with a payment application running in the TEE of a host processor19: Watch with a payment application running in a host processor Values from 20–99 exclusively indicate the form factor only without also indicating the storage technology20: Card21: Phone e.g. Mobile Phone22: Tablet/e-reader23: Watch/Wristband e.g. Watch or wristband, including a fitness band, smart strap, disposable band, watch add-on, and security/ID band24: Sticker25: PC26: Device Peripheral e.g. mobile phone case or sleeve27: Tag e.g. key fob or mobile tag28: Jewelry e.g. ring, bracelet, necklace and cuff links29: Fashion Accessory e.g. handbag, bag charm and glasses30: Garment e.g. dress31: Domestic Appliance e.g refrigerator, washing machine32: Vehicle e.g. vehicle, including vehicle attached devices33: Media/Gaming Device e.g. media or gaming device, including a set top box, media player and television 34–99 are reserved for future form factors. Any value in this range may occur within form factor and transaction data without prior notice. This field is supported only for Mastercard on CyberSource through VisaNet. When initiation channel is not provided via this API field, the value is extracted from EMV tag 9F6E for Mastercard transactions. To enable this feature please call support.
Used by
Authorization Optional field.
402 403 404 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 402 def third_party_token @third_party_token end |
#tokenized_card ⇒ TokenizedCard
TODO: Write general description for this method
18 19 20 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 18 def tokenized_card @tokenized_card end |
#tokenized_payment_method ⇒ TokenizedPaymentMethod
TODO: Write general description for this method
22 23 24 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 22 def tokenized_payment_method @tokenized_payment_method end |
Class Method Details
.from_element(root) ⇒ Object
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 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 587 def self.from_element(root) card = XmlUtilities.from_element(root, 'Card', Card) tokenized_card = XmlUtilities.from_element(root, 'TokenizedCard', TokenizedCard) tokenized_payment_method = XmlUtilities.from_element( root, 'TokenizedPaymentMethod', TokenizedPaymentMethod ) direct_debit = XmlUtilities.from_element(root, 'DirectDebit', DirectDebit) fluid_data = XmlUtilities.from_element(root, 'FluidData', FluidData) customer = XmlUtilities.from_element(root, 'Customer', Customer) payment_instrument = XmlUtilities.from_element(root, 'PaymentInstrument', PaymentInstrument) instrument_identifier = XmlUtilities.from_element(root, 'InstrumentIdentifier', InstrumentIdentifier) shipping_address = XmlUtilities.from_element(root, 'ShippingAddress', ShippingAddress) legacy_token = XmlUtilities.from_element(root, 'LegacyToken', LegacyToken) bank = XmlUtilities.from_element(root, 'Bank', Bank) = XmlUtilities.from_element(root, 'Options', Options) payment_type = XmlUtilities.from_element(root, 'PaymentType', PaymentType) initiation_channel = XmlUtilities.from_element(root, 'initiationChannel', String) sepa = XmlUtilities.from_element(root, 'Sepa', Sepa) e_wallet = XmlUtilities.from_element(root, 'EWallet', EWallet) payment_account_reference = XmlUtilities.from_element( root, 'PaymentAccountReference', PaymentAccountReference ) third_party_token = XmlUtilities.from_element(root, 'ThirdPartyToken', ThirdPartyToken) merchant_limited_acceptance_indicator = XmlUtilities.from_element( root, 'merchantLimitedAcceptanceIndicator', String ) new(card: card, tokenized_card: tokenized_card, tokenized_payment_method: tokenized_payment_method, direct_debit: direct_debit, fluid_data: fluid_data, customer: customer, payment_instrument: payment_instrument, instrument_identifier: instrument_identifier, shipping_address: shipping_address, legacy_token: legacy_token, bank: bank, options: , payment_type: payment_type, initiation_channel: initiation_channel, sepa: sepa, e_wallet: e_wallet, payment_account_reference: payment_account_reference, third_party_token: third_party_token, merchant_limited_acceptance_indicator: merchant_limited_acceptance_indicator, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 524 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. card = Card.from_hash(hash['card']) if hash['card'] tokenized_card = TokenizedCard.from_hash(hash['tokenizedCard']) if hash['tokenizedCard'] tokenized_payment_method = TokenizedPaymentMethod.from_hash(hash['tokenizedPaymentMethod']) if hash['tokenizedPaymentMethod'] direct_debit = DirectDebit.from_hash(hash['directDebit']) if hash['directDebit'] fluid_data = FluidData.from_hash(hash['fluidData']) if hash['fluidData'] customer = Customer.from_hash(hash['customer']) if hash['customer'] payment_instrument = PaymentInstrument.from_hash(hash['paymentInstrument']) if hash['paymentInstrument'] instrument_identifier = InstrumentIdentifier.from_hash(hash['instrumentIdentifier']) if hash['instrumentIdentifier'] shipping_address = ShippingAddress.from_hash(hash['shippingAddress']) if hash['shippingAddress'] legacy_token = LegacyToken.from_hash(hash['legacyToken']) if hash['legacyToken'] bank = Bank.from_hash(hash['bank']) if hash['bank'] = Options.from_hash(hash['options']) if hash['options'] payment_type = PaymentType.from_hash(hash['paymentType']) if hash['paymentType'] initiation_channel = hash.key?('initiationChannel') ? hash['initiationChannel'] : SKIP sepa = Sepa.from_hash(hash['sepa']) if hash['sepa'] e_wallet = EWallet.from_hash(hash['eWallet']) if hash['eWallet'] if hash['paymentAccountReference'] payment_account_reference = PaymentAccountReference.from_hash(hash['paymentAccountReference']) end third_party_token = ThirdPartyToken.from_hash(hash['thirdPartyToken']) if hash['thirdPartyToken'] merchant_limited_acceptance_indicator = hash.key?('merchantLimitedAcceptanceIndicator') ? hash['merchantLimitedAcceptanceIndicator'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. PaymentInformation.new(card: card, tokenized_card: tokenized_card, tokenized_payment_method: tokenized_payment_method, direct_debit: direct_debit, fluid_data: fluid_data, customer: customer, payment_instrument: payment_instrument, instrument_identifier: instrument_identifier, shipping_address: shipping_address, legacy_token: legacy_token, bank: bank, options: , payment_type: payment_type, initiation_channel: initiation_channel, sepa: sepa, e_wallet: e_wallet, payment_account_reference: payment_account_reference, third_party_token: third_party_token, merchant_limited_acceptance_indicator: merchant_limited_acceptance_indicator, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 427 def self.names @_hash = {} if @_hash.nil? @_hash['card'] = 'card' @_hash['tokenized_card'] = 'tokenizedCard' @_hash['tokenized_payment_method'] = 'tokenizedPaymentMethod' @_hash['direct_debit'] = 'directDebit' @_hash['fluid_data'] = 'fluidData' @_hash['customer'] = 'customer' @_hash['payment_instrument'] = 'paymentInstrument' @_hash['instrument_identifier'] = 'instrumentIdentifier' @_hash['shipping_address'] = 'shippingAddress' @_hash['legacy_token'] = 'legacyToken' @_hash['bank'] = 'bank' @_hash['options'] = 'options' @_hash['payment_type'] = 'paymentType' @_hash['initiation_channel'] = 'initiationChannel' @_hash['sepa'] = 'sepa' @_hash['e_wallet'] = 'eWallet' @_hash['payment_account_reference'] = 'paymentAccountReference' @_hash['third_party_token'] = 'thirdPartyToken' @_hash['merchant_limited_acceptance_indicator'] = 'merchantLimitedAcceptanceIndicator' @_hash end |
.nullables ⇒ Object
An array for nullable fields
478 479 480 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 478 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 453 def self.optionals %w[ card tokenized_card tokenized_payment_method direct_debit fluid_data customer payment_instrument instrument_identifier shipping_address legacy_token bank options payment_type initiation_channel sepa e_wallet payment_account_reference third_party_token merchant_limited_acceptance_indicator ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 696 def inspect class_name = self.class.name.split('::').last "<#{class_name} card: #{@card.inspect}, tokenized_card: #{@tokenized_card.inspect},"\ " tokenized_payment_method: #{@tokenized_payment_method.inspect}, direct_debit:"\ " #{@direct_debit.inspect}, fluid_data: #{@fluid_data.inspect}, customer:"\ " #{@customer.inspect}, payment_instrument: #{@payment_instrument.inspect},"\ " instrument_identifier: #{@instrument_identifier.inspect}, shipping_address:"\ " #{@shipping_address.inspect}, legacy_token: #{@legacy_token.inspect}, bank:"\ " #{@bank.inspect}, options: #{@options.inspect}, payment_type: #{@payment_type.inspect},"\ " initiation_channel: #{@initiation_channel.inspect}, sepa: #{@sepa.inspect}, e_wallet:"\ " #{@e_wallet.inspect}, payment_account_reference: #{@payment_account_reference.inspect},"\ " third_party_token: #{@third_party_token.inspect}, merchant_limited_acceptance_indicator:"\ " #{@merchant_limited_acceptance_indicator.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
681 682 683 684 685 686 687 688 689 690 691 692 693 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 681 def to_s class_name = self.class.name.split('::').last "<#{class_name} card: #{@card}, tokenized_card: #{@tokenized_card},"\ " tokenized_payment_method: #{@tokenized_payment_method}, direct_debit: #{@direct_debit},"\ " fluid_data: #{@fluid_data}, customer: #{@customer}, payment_instrument:"\ " #{@payment_instrument}, instrument_identifier: #{@instrument_identifier},"\ " shipping_address: #{@shipping_address}, legacy_token: #{@legacy_token}, bank: #{@bank},"\ " options: #{@options}, payment_type: #{@payment_type}, initiation_channel:"\ " #{@initiation_channel}, sepa: #{@sepa}, e_wallet: #{@e_wallet}, payment_account_reference:"\ " #{@payment_account_reference}, third_party_token: #{@third_party_token},"\ " merchant_limited_acceptance_indicator: #{@merchant_limited_acceptance_indicator},"\ " additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
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 |
# File 'lib/cyber_source_merged_spec/models/payment_information.rb', line 643 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'Card', card) XmlUtilities.add_as_subelement(doc, root, 'TokenizedCard', tokenized_card) XmlUtilities.add_as_subelement(doc, root, 'TokenizedPaymentMethod', tokenized_payment_method) XmlUtilities.add_as_subelement(doc, root, 'DirectDebit', direct_debit) XmlUtilities.add_as_subelement(doc, root, 'FluidData', fluid_data) XmlUtilities.add_as_subelement(doc, root, 'Customer', customer) XmlUtilities.add_as_subelement(doc, root, 'PaymentInstrument', payment_instrument) XmlUtilities.add_as_subelement(doc, root, 'InstrumentIdentifier', instrument_identifier) XmlUtilities.add_as_subelement(doc, root, 'ShippingAddress', shipping_address) XmlUtilities.add_as_subelement(doc, root, 'LegacyToken', legacy_token) XmlUtilities.add_as_subelement(doc, root, 'Bank', bank) XmlUtilities.add_as_subelement(doc, root, 'Options', ) XmlUtilities.add_as_subelement(doc, root, 'PaymentType', payment_type) XmlUtilities.add_as_subelement(doc, root, 'initiationChannel', initiation_channel) XmlUtilities.add_as_subelement(doc, root, 'Sepa', sepa) XmlUtilities.add_as_subelement(doc, root, 'EWallet', e_wallet) XmlUtilities.add_as_subelement(doc, root, 'PaymentAccountReference', payment_account_reference) XmlUtilities.add_as_subelement(doc, root, 'ThirdPartyToken', third_party_token) XmlUtilities.add_as_subelement(doc, root, 'merchantLimitedAcceptanceIndicator', merchant_limited_acceptance_indicator) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |