Module: Vindi::Rest::Merchant
- Included in:
- Vindi::Rest
- Defined in:
- lib/vindi/rest/merchant.rb
Overview
Methods for the merchants API
Instance Method Summary collapse
-
#current_merchant ⇒ Hash
Get a current merchant for the authenticate user.
-
#list_merchants(options = {}) ⇒ Array<Hash>
List merchants for the authenticate user.
-
#merchant(merchant_id, options = {}) ⇒ Object
Edit a merchant.
Instance Method Details
#current_merchant ⇒ Hash
Get a current merchant for the authenticate user
25 26 27 |
# File 'lib/vindi/rest/merchant.rb', line 25 def current_merchant get("merchants/current")[:merchant] end |
#list_merchants(options = {}) ⇒ Array<Hash>
List merchants for the authenticate user
14 15 16 |
# File 'lib/vindi/rest/merchant.rb', line 14 def list_merchants( = {}) get('merchants', )[:merchants] end |
#merchant(merchant_id, options = {}) ⇒ Object
Edit a merchant
36 37 38 |
# File 'lib/vindi/rest/merchant.rb', line 36 def merchant(merchant_id, = {}) get("merchants/#{merchant_id}", )[:merchant] end |