Class: PaypalServerSdk::RefundPaymentInstruction
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::RefundPaymentInstruction
- Defined in:
- lib/paypal_server_sdk/models/refund_payment_instruction.rb
Overview
Any additional payments instructions during refund payment processing. This object is only applicable to merchants that have been enabled for PayPal Commerce Platform for Marketplaces and Platforms capability. Please speak to your account manager if you want to use this capability.
Instance Attribute Summary collapse
-
#platform_fees ⇒ Array[RefundPlatformFee]
Specifies the amount that the API caller will contribute to the refund being processed.
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(platform_fees: SKIP) ⇒ RefundPaymentInstruction
constructor
A new instance of RefundPaymentInstruction.
Methods inherited from BaseModel
Constructor Details
#initialize(platform_fees: SKIP) ⇒ RefundPaymentInstruction
Returns a new instance of RefundPaymentInstruction.
44 45 46 |
# File 'lib/paypal_server_sdk/models/refund_payment_instruction.rb', line 44 def initialize(platform_fees: SKIP) @platform_fees = platform_fees unless platform_fees == SKIP end |
Instance Attribute Details
#platform_fees ⇒ Array[RefundPlatformFee]
Specifies the amount that the API caller will contribute to the refund being processed. The amount needs to be lower than platform_fees amount originally captured or the amount that is remaining if multiple refunds have been processed. This field is only applicable to merchants that have been enabled for PayPal Commerce Platform for Marketplaces and Platforms capability. Please speak to your account manager if you want to use this capability.
23 24 25 |
# File 'lib/paypal_server_sdk/models/refund_payment_instruction.rb', line 23 def platform_fees @platform_fees end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/paypal_server_sdk/models/refund_payment_instruction.rb', line 49 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. # Parameter is an array, so we need to iterate through it platform_fees = nil unless hash['platform_fees'].nil? platform_fees = [] hash['platform_fees'].each do |structure| platform_fees << (RefundPlatformFee.from_hash(structure) if structure) end end platform_fees = SKIP unless hash.key?('platform_fees') # Create object from extracted values. RefundPaymentInstruction.new(platform_fees: platform_fees) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 |
# File 'lib/paypal_server_sdk/models/refund_payment_instruction.rb', line 26 def self.names @_hash = {} if @_hash.nil? @_hash['platform_fees'] = 'platform_fees' @_hash end |
.nullables ⇒ Object
An array for nullable fields
40 41 42 |
# File 'lib/paypal_server_sdk/models/refund_payment_instruction.rb', line 40 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
33 34 35 36 37 |
# File 'lib/paypal_server_sdk/models/refund_payment_instruction.rb', line 33 def self.optionals %w[ platform_fees ] end |