Sha256: 6f40ed7b4f40c7885aa23fd1168df4980085540b73deb88ef2d4aed521c06e69

Contents?: true

Size: 1.49 KB

Versions: 7

Compression:

Stored size: 1.49 KB

Contents

# frozen_string_literal: true

module PaypalAPI
  #
  # The Referenced Payouts API enables partner merchants and developers to process individual referenced payouts to recipients.
  #
  # @see https://developer.paypal.com/docs/api/referenced-payouts/v1/
  #
  class ReferencedPayouts < APICollection
    #
    # Common class and instance methods
    #
    module APIs
      # @!macro [new] request
      #   @param query [Hash, nil] Request query parameters
      #   @param body [Hash, nil] Request body parameters
      #   @param headers [Hash, nil] Request headers
      #   @return [Response] Response object

      #
      # Create referenced batch payout
      #
      # @see https://developer.paypal.com/docs/api/referenced-payouts/v1/#referenced-payouts_create_batch
      #
      # @macro request
      #
      def create(query: nil, body: nil, headers: nil)
        client.post("/v1/payments/referenced-payouts", query: query, body: body, headers: headers)
      end

      #
      # List items in referenced batch payout
      #
      # @see https://developer.paypal.com/docs/api/payments.payouts-batch/v1/#payouts_get
      #
      # @param payout_batch_id [String] The ID of the reference batch payout for which to list items.
      # @macro request
      #
      def show(payout_batch_id, query: nil, body: nil, headers: nil)
        client.get("/v1/payments/referenced-payouts/#{encode(payout_batch_id)}", query: query, body: body, headers: headers)
      end
    end

    include APIs
    extend APIs
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
paypal-rest-api-0.3.1 lib/paypal-api/api_collections/referenced_payouts.rb
paypal-rest-api-0.3.0 lib/paypal-api/api_collections/referenced_payouts.rb
paypal-rest-api-0.2.1 lib/paypal-api/api_collections/referenced_payouts.rb
paypal-rest-api-0.2.0 lib/paypal-api/api_collections/referenced_payouts.rb
paypal-rest-api-0.1.1 lib/paypal-api/api_collections/referenced_payouts.rb
paypal-rest-api-0.1.0 lib/paypal-api/api_collections/referenced_payouts.rb
paypal-rest-api-0.0.4 lib/paypal-api/api_collections/referenced_payouts.rb