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

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Payment.

Parameters:



36
37
38
# File 'lib/finch_api/resources/sandbox/payment.rb', line 36

def initialize(client:)
  @client = client
end

Instance Method Details

#create(end_date: nil, pay_statements: nil, start_date: nil, request_options: {}) ⇒ FinchAPI::Models::Sandbox::PaymentCreateResponse

Add a new sandbox payment

Parameters:

Returns:

See Also:



22
23
24
25
26
27
28
29
30
31
# File 'lib/finch_api/resources/sandbox/payment.rb', line 22

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