Class: FinchAPI::Resources::Sandbox::Payment
- Inherits:
-
Object
- Object
- FinchAPI::Resources::Sandbox::Payment
- Defined in:
- lib/finch-api/resources/sandbox/payment.rb
Instance Method Summary collapse
-
#create(params = {}) ⇒ FinchAPI::Models::Sandbox::PaymentCreateResponse
Add a new sandbox payment.
-
#initialize(client:) ⇒ Payment
constructor
A new instance of Payment.
Constructor Details
#initialize(client:) ⇒ Payment
Returns a new instance of Payment.
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
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/finch-api/resources/sandbox/payment.rb', line 20 def create(params = {}) parsed, = FinchAPI::Models::Sandbox::PaymentCreateParams.dump_request(params) @client.request( method: :post, path: "sandbox/payment", body: parsed, model: FinchAPI::Models::Sandbox::PaymentCreateResponse, options: ) end |