Class: Billingrails::Resources::Payments

Inherits:
Object
  • Object
show all
Defined in:
lib/billingrails/resources/payments.rb

Overview

Payments resource

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Payments

Returns a new instance of Payments.

Parameters:

  • client (Client)

    The API client



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.

Parameters:

  • data (Hash)

    Request body

Returns:

  • (Hash)

    Response data



20
21
22
23
# File 'lib/billingrails/resources/payments.rb', line 20

def create(data)
  path = "/payments"
  @client.request(:post, path, body: data)
end