Class: FinchAPI::Resources::Sandbox::Payment

Inherits:
Object
  • Object
show all
Defined in:
lib/finch-api/resources/sandbox/payment.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Payment

Returns a new instance of Payment.

Parameters:



32
33
34
# File 'lib/finch-api/resources/sandbox/payment.rb', line 32

def initialize(client:)
  @client = client
end

Instance Method Details

#create(params = {}) ⇒ FinchAPI::Models::Sandbox::PaymentCreateResponse

Add a new sandbox payment

Parameters:

  • params (FinchAPI::Models::Sandbox::PaymentCreateParams, Hash{Symbol=>Object}) (defaults to: {})

    .

    @option params [String] :end_date

    @option params [Array<FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement>] :pay_statements

    @option params [String] :start_date

    @option params [FinchAPI::RequestOptions, HashSymbol=>Object, nil] :request_options

Returns:



20
21
22
23
24
25
26
27
28
29
# File 'lib/finch-api/resources/sandbox/payment.rb', line 20

def create(params = {})
  parsed, options = FinchAPI::Models::Sandbox::PaymentCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "sandbox/payment",
    body: parsed,
    model: FinchAPI::Models::Sandbox::PaymentCreateResponse,
    options: options
  )
end