Class: Billingrails::Resources::Fees
- Inherits:
-
Object
- Object
- Billingrails::Resources::Fees
- Defined in:
- lib/billingrails/resources/fees.rb
Overview
Fees resource
Instance Method Summary collapse
-
#create(data) ⇒ Hash
Create a fee.
-
#delete(id) ⇒ Hash
Delete a fee.
-
#initialize(client) ⇒ Fees
constructor
A new instance of Fees.
-
#list ⇒ Hash
List fees.
-
#retrieve(id, params: nil) ⇒ Hash
Retrieve fee.
-
#update(id, data) ⇒ Hash
Update a fee.
Constructor Details
#initialize(client) ⇒ Fees
Returns a new instance of Fees.
10 11 12 |
# File 'lib/billingrails/resources/fees.rb', line 10 def initialize(client) @client = client end |
Instance Method Details
#create(data) ⇒ Hash
Create a fee
Creates a fee.
65 66 67 68 |
# File 'lib/billingrails/resources/fees.rb', line 65 def create(data) path = "/biller/fees" @client.request(:post, path, body: data) end |
#delete(id) ⇒ Hash
Delete a fee
Deletes a fee.
44 45 46 47 |
# File 'lib/billingrails/resources/fees.rb', line 44 def delete(id) path = "/biller/fees/#{id}" @client.request(:delete, path) end |
#list ⇒ Hash
List fees
Retrieve a list of fees.
54 55 56 57 |
# File 'lib/billingrails/resources/fees.rb', line 54 def list() path = "/biller/fees" @client.request(:get, path) end |
#retrieve(id, params: nil) ⇒ Hash
Retrieve fee
Retrieves a fee by ID.
21 22 23 24 |
# File 'lib/billingrails/resources/fees.rb', line 21 def retrieve(id, params: nil) path = "/biller/fees/#{id}" @client.request(:get, path, params: params) end |
#update(id, data) ⇒ Hash
Update a fee
Updates a fee.
33 34 35 36 |
# File 'lib/billingrails/resources/fees.rb', line 33 def update(id, data) path = "/biller/fees/#{id}" @client.request(:put, path, body: data) end |