Class: Increase::Resources::Transactions
- Inherits:
-
Object
- Object
- Increase::Resources::Transactions
- Defined in:
- lib/increase/resources/transactions.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Transactions
constructor
A new instance of Transactions.
-
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::Transaction>
List Transactions.
-
#retrieve(transaction_id, opts = {}) ⇒ Increase::Models::Transaction
Retrieve a Transaction.
Constructor Details
#initialize(client:) ⇒ Transactions
Returns a new instance of Transactions.
6 7 8 |
# File 'lib/increase/resources/transactions.rb', line 6 def initialize(client:) @client = client end |
Instance Method Details
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::Transaction>
List Transactions
39 40 41 42 43 44 45 46 47 |
# File 'lib/increase/resources/transactions.rb', line 39 def list(params = {}, opts = {}) req = {} req[:method] = :get req[:path] = "/transactions" req[:query] = params req[:page] = Increase::Page req[:model] = Increase::Models::Transaction @client.request(req, opts) end |
#retrieve(transaction_id, opts = {}) ⇒ Increase::Models::Transaction
Retrieve a Transaction
16 17 18 19 20 21 22 |
# File 'lib/increase/resources/transactions.rb', line 16 def retrieve(transaction_id, opts = {}) req = {} req[:method] = :get req[:path] = "/transactions/#{transaction_id}" req[:model] = Increase::Models::Transaction @client.request(req, opts) end |