Class: PaypalServerSdk::SupplementaryPurchaseData
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::SupplementaryPurchaseData
- Defined in:
- lib/paypal_server_sdk/models/supplementary_purchase_data.rb
Overview
The capture identification-related fields. Includes the invoice ID, custom ID, note to payer, and soft descriptor.
Instance Attribute Summary collapse
-
#invoice_id ⇒ String
The API caller-provided external invoice number for this order.
-
#note_to_payer ⇒ String
An informational note about this settlement.
Class Method Summary collapse
-
.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(invoice_id: SKIP, note_to_payer: SKIP) ⇒ SupplementaryPurchaseData
constructor
A new instance of SupplementaryPurchaseData.
Methods inherited from BaseModel
Constructor Details
#initialize(invoice_id: SKIP, note_to_payer: SKIP) ⇒ SupplementaryPurchaseData
Returns a new instance of SupplementaryPurchaseData.
45 46 47 48 |
# File 'lib/paypal_server_sdk/models/supplementary_purchase_data.rb', line 45 def initialize(invoice_id: SKIP, note_to_payer: SKIP) @invoice_id = invoice_id unless invoice_id == SKIP @note_to_payer = note_to_payer unless note_to_payer == SKIP end |
Instance Attribute Details
#invoice_id ⇒ String
The API caller-provided external invoice number for this order. Appears in both the payer’s transaction history and the emails that the payer receives.
17 18 19 |
# File 'lib/paypal_server_sdk/models/supplementary_purchase_data.rb', line 17 def invoice_id @invoice_id end |
#note_to_payer ⇒ String
An informational note about this settlement. Appears in both the payer’s transaction history and the emails that the payer receives.
22 23 24 |
# File 'lib/paypal_server_sdk/models/supplementary_purchase_data.rb', line 22 def note_to_payer @note_to_payer end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/paypal_server_sdk/models/supplementary_purchase_data.rb', line 51 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP note_to_payer = hash.key?('note_to_payer') ? hash['note_to_payer'] : SKIP # Create object from extracted values. SupplementaryPurchaseData.new(invoice_id: invoice_id, note_to_payer: note_to_payer) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 |
# File 'lib/paypal_server_sdk/models/supplementary_purchase_data.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['invoice_id'] = 'invoice_id' @_hash['note_to_payer'] = 'note_to_payer' @_hash end |
.nullables ⇒ Object
An array for nullable fields
41 42 43 |
# File 'lib/paypal_server_sdk/models/supplementary_purchase_data.rb', line 41 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
33 34 35 36 37 38 |
# File 'lib/paypal_server_sdk/models/supplementary_purchase_data.rb', line 33 def self.optionals %w[ invoice_id note_to_payer ] end |