Class: PaypalServerSdk::RefundPlatformFee
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::RefundPlatformFee
- Defined in:
- lib/paypal_server_sdk/models/refund_platform_fee.rb
Overview
The platform or partner fee, commission, or brokerage fee that is associated with the transaction. Not a separate or isolated transaction leg from the external perspective. The platform fee is limited in scope and is always associated with the original payment for the purchase unit.
Instance Attribute Summary collapse
-
#amount ⇒ Money
The currency and amount for a financial transaction, such as a balance or payment due.
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(amount:) ⇒ RefundPlatformFee
constructor
A new instance of RefundPlatformFee.
Methods inherited from BaseModel
Constructor Details
#initialize(amount:) ⇒ RefundPlatformFee
Returns a new instance of RefundPlatformFee.
37 38 39 |
# File 'lib/paypal_server_sdk/models/refund_platform_fee.rb', line 37 def initialize(amount:) @amount = amount end |
Instance Attribute Details
#amount ⇒ Money
The currency and amount for a financial transaction, such as a balance or payment due.
18 19 20 |
# File 'lib/paypal_server_sdk/models/refund_platform_fee.rb', line 18 def amount @amount end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
42 43 44 45 46 47 48 49 50 |
# File 'lib/paypal_server_sdk/models/refund_platform_fee.rb', line 42 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. amount = Money.from_hash(hash['amount']) if hash['amount'] # Create object from extracted values. RefundPlatformFee.new(amount: amount) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 |
# File 'lib/paypal_server_sdk/models/refund_platform_fee.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['amount'] = 'amount' @_hash end |
.nullables ⇒ Object
An array for nullable fields
33 34 35 |
# File 'lib/paypal_server_sdk/models/refund_platform_fee.rb', line 33 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
28 29 30 |
# File 'lib/paypal_server_sdk/models/refund_platform_fee.rb', line 28 def self.optionals [] end |