Class: PaypalServerSdk::RefundPlatformFee

Inherits:
BaseModel
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

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

#amountMoney

The currency and amount for a financial transaction, such as a balance or payment due.

Returns:



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

.namesObject

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

.nullablesObject

An array for nullable fields



33
34
35
# File 'lib/paypal_server_sdk/models/refund_platform_fee.rb', line 33

def self.nullables
  []
end

.optionalsObject

An array for optional fields



28
29
30
# File 'lib/paypal_server_sdk/models/refund_platform_fee.rb', line 28

def self.optionals
  []
end