Class: PaypalServerSdk::ConfirmOrderRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::ConfirmOrderRequest
- Defined in:
- lib/paypal_server_sdk/models/confirm_order_request.rb
Overview
Payer confirms the intent to pay for the Order using the provided payment source.
Instance Attribute Summary collapse
-
#application_context ⇒ OrderConfirmApplicationContext
Customizes the payer confirmation experience.
-
#payment_source ⇒ PaymentSource
The payment source definition.
-
#processing_instruction ⇒ Object
The payment source definition.
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(payment_source:, processing_instruction: SKIP, application_context: SKIP) ⇒ ConfirmOrderRequest
constructor
A new instance of ConfirmOrderRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(payment_source:, processing_instruction: SKIP, application_context: SKIP) ⇒ ConfirmOrderRequest
Returns a new instance of ConfirmOrderRequest.
47 48 49 50 51 52 |
# File 'lib/paypal_server_sdk/models/confirm_order_request.rb', line 47 def initialize(payment_source:, processing_instruction: SKIP, application_context: SKIP) @payment_source = payment_source @processing_instruction = processing_instruction unless processing_instruction == SKIP @application_context = application_context unless application_context == SKIP end |
Instance Attribute Details
#application_context ⇒ OrderConfirmApplicationContext
Customizes the payer confirmation experience.
23 24 25 |
# File 'lib/paypal_server_sdk/models/confirm_order_request.rb', line 23 def application_context @application_context end |
#payment_source ⇒ PaymentSource
The payment source definition.
15 16 17 |
# File 'lib/paypal_server_sdk/models/confirm_order_request.rb', line 15 def payment_source @payment_source end |
#processing_instruction ⇒ Object
The payment source definition.
19 20 21 |
# File 'lib/paypal_server_sdk/models/confirm_order_request.rb', line 19 def processing_instruction @processing_instruction end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/paypal_server_sdk/models/confirm_order_request.rb', line 55 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. payment_source = PaymentSource.from_hash(hash['payment_source']) if hash['payment_source'] processing_instruction = hash.key?('processing_instruction') ? hash['processing_instruction'] : SKIP application_context = OrderConfirmApplicationContext.from_hash(hash['application_context']) if hash['application_context'] # Create object from extracted values. ConfirmOrderRequest.new(payment_source: payment_source, processing_instruction: processing_instruction, application_context: application_context) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 31 32 |
# File 'lib/paypal_server_sdk/models/confirm_order_request.rb', line 26 def self.names @_hash = {} if @_hash.nil? @_hash['payment_source'] = 'payment_source' @_hash['processing_instruction'] = 'processing_instruction' @_hash['application_context'] = 'application_context' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 |
# File 'lib/paypal_server_sdk/models/confirm_order_request.rb', line 43 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
35 36 37 38 39 40 |
# File 'lib/paypal_server_sdk/models/confirm_order_request.rb', line 35 def self.optionals %w[ processing_instruction application_context ] end |