Class: PayPal::SDK::REST::DataTypes::PayoutItem

Inherits:
Base show all
Includes:
RequestDataType
Defined in:
lib/paypal-sdk/rest/data_types.rb

Constant Summary

Constants inherited from Core::API::DataTypes::Base

Core::API::DataTypes::Base::ContentKey, Core::API::DataTypes::Base::HashOptions

Instance Attribute Summary

Attributes inherited from Base

#error, #header, #request_id

Class Method Summary collapse

Methods included from RequestDataType

#api, api, #error=, included

Methods included from SetAPI

#client_id=, #client_secret=, #set_config, #token=

Methods inherited from Base

#http_header, #merge!, #raise_error!, raise_on_api_error, #success?

Methods inherited from Core::API::DataTypes::Base

add_attribute, add_member, array_of, #convert_array, #convert_object, define_alias_methods, #hash_key, #initialize, #member_names, members, #members, #merge!, object_of, #set, #skip_value?, snakecase, #to_hash, #value_to_hash

Methods included from Core::Logging

#log_event, #logger, logger, logger=

Constructor Details

This class inherits a constructor from PayPal::SDK::Core::API::DataTypes::Base

Class Method Details

.cancel(payout_item_id) ⇒ Object

Raises:

  • (ArgumentError)


1727
1728
1729
1730
1731
# File 'lib/paypal-sdk/rest/data_types.rb', line 1727

def cancel(payout_item_id)
  raise ArgumentError.new("payout_item_id required") if payout_item_id.to_s.strip.empty?
  path = "v1/payments/payouts-item/#{payout_item_id}/cancel"
  PayoutItemDetails.new(api.post(path))
end

.get(payout_item_id) ⇒ Object

Raises:

  • (ArgumentError)


1722
1723
1724
1725
1726
# File 'lib/paypal-sdk/rest/data_types.rb', line 1722

def get(payout_item_id)
  raise ArgumentError.new("payout_item_id required") if payout_item_id.to_s.strip.empty?
  path = "v1/payments/payouts-item/#{payout_item_id}"
  PayoutItemDetails.new(api.get(path))
end

.load_membersObject



1710
1711
1712
1713
1714
1715
1716
1717
# File 'lib/paypal-sdk/rest/data_types.rb', line 1710

def self.load_members
      object_of :recipient_type, String
      object_of :amount, Currency
      object_of :note, String
      object_of :receiver, String
      object_of :sender_item_id, String
      object_of :recipient_wallet, String
end