Class: Billingrails::Resources::Payments
- Inherits:
-
Object
- Object
- Billingrails::Resources::Payments
- Defined in:
- lib/billingrails/resources/payments.rb
Overview
Payments resource
Instance Method Summary collapse
-
#create(data) ⇒ Hash
Create a payment.
-
#initialize(client) ⇒ Payments
constructor
A new instance of Payments.
Constructor Details
#initialize(client) ⇒ Payments
Returns a new instance of Payments.
10 11 12 |
# File 'lib/billingrails/resources/payments.rb', line 10 def initialize(client) @client = client end |
Instance Method Details
#create(data) ⇒ Hash
Create a payment
Create an online or offline payment for an invoice, order, payment request, or credit grant.
20 21 22 23 |
# File 'lib/billingrails/resources/payments.rb', line 20 def create(data) path = "/payments" @client.request(:post, path, body: data) end |