Class: PayPal::SDK::REST::DataTypes::Payout
- Inherits:
-
Base
- Object
- Core::API::DataTypes::Base
- Base
- PayPal::SDK::REST::DataTypes::Payout
- 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
Class Method Summary collapse
Instance Method Summary collapse
Methods included from RequestDataType
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
.get(payout_batch_id, options = {}) ⇒ Object
1701 1702 1703 1704 1705 |
# File 'lib/paypal-sdk/rest/data_types.rb', line 1701 def get(payout_batch_id, = {}) raise ArgumentError.new("id required") if payout_batch_id.to_s.strip.empty? path = "v1/payments/payouts/#{payout_batch_id}" PayoutBatch.new(api.get(path, )) end |
.load_members ⇒ Object
1686 1687 1688 1689 |
# File 'lib/paypal-sdk/rest/data_types.rb', line 1686 def self.load_members object_of :sender_batch_header, PayoutSenderBatchHeader array_of :items, PayoutItem end |
Instance Method Details
#create(sync_mode = false) ⇒ Object
1693 1694 1695 1696 1697 1698 |
# File 'lib/paypal-sdk/rest/data_types.rb', line 1693 def create(sync_mode = false) path = "v1/payments/payouts" = { :sync_mode => sync_mode } response = api.post(path, self.to_hash, http_header, ) PayoutBatch.new(response) end |