Module: Vindi::Rest::Discount
- Included in:
- Vindi::Rest
- Defined in:
- lib/vindi/rest/discount.rb
Overview
Methods for the discount API
Instance Method Summary collapse
-
#create_discount(options = {}) ⇒ Hash
Create a discount for a merchant vindi.
-
#delete_discount(discount_id, options = {}) ⇒ Object
Delete a discount from merchant vindi.
-
#discount(discount_id, options = {}) ⇒ Hash
Get a single discount from a merchant.
Instance Method Details
#create_discount(options = {}) ⇒ Hash
Create a discount for a merchant vindi
28 29 30 |
# File 'lib/vindi/rest/discount.rb', line 28 def create_discount( = {}) post('discounts', )[:discount] end |
#delete_discount(discount_id, options = {}) ⇒ Object
Delete a discount from merchant vindi
40 41 42 |
# File 'lib/vindi/rest/discount.rb', line 40 def delete_discount(discount_id, = {}) delete("discounts/#{discount_id}", )[:discount] end |
#discount(discount_id, options = {}) ⇒ Hash
Get a single discount from a merchant
15 16 17 |
# File 'lib/vindi/rest/discount.rb', line 15 def discount(discount_id, = {}) get("discounts/#{discount_id}", )[:discount] end |