Class: Pingpp::CouponTemplate
- Inherits:
-
AppBasedResource
- Object
- PingppObject
- APIResource
- AppBasedResource
- Pingpp::CouponTemplate
- Extended by:
- APIOperations::Create, APIOperations::List
- Includes:
- APIOperations::Delete, APIOperations::Update
- Defined in:
- lib/pingpp/coupon_template.rb
Class Method Summary collapse
- .create_coupons(coupon_template, params = {}, opts = {}) ⇒ Object
- .list_coupons(coupon_template, filters = {}, opts = {}) ⇒ Object
- .object_name ⇒ Object
Methods included from APIOperations::Create
Methods included from APIOperations::List
Methods included from APIOperations::Update
Methods included from APIOperations::Delete
Methods inherited from AppBasedResource
Methods inherited from APIResource
class_name, #refresh, resource_url, #resource_url, retrieve, uri_object_name
Methods included from APIOperations::Request
Methods inherited from PingppObject
#==, #[], #[]=, #_dump, _load, #as_json, construct_from, #each, #initialize, #inspect, #keys, #refresh_from, #respond_to?, #serialize_params, #to_hash, #to_json, #to_s, #values
Constructor Details
This class inherits a constructor from Pingpp::PingppObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Pingpp::PingppObject
Class Method Details
.create_coupons(coupon_template, params = {}, opts = {}) ⇒ Object
18 19 20 21 |
# File 'lib/pingpp/coupon_template.rb', line 18 def self.create_coupons(coupon_template, params={}, opts={}) response, opts = request(:post, coupon_url(coupon_template, opts), params, opts) Util.convert_to_pingpp_object(response, opts) end |
.list_coupons(coupon_template, filters = {}, opts = {}) ⇒ Object
12 13 14 15 16 |
# File 'lib/pingpp/coupon_template.rb', line 12 def self.list_coupons(coupon_template, filters={}, opts={}) opts = Util.normalize_opts(opts) response, opts = request(:get, coupon_url(coupon_template, opts), filters, opts) ListObject.construct_from(response, opts) end |
.object_name ⇒ Object
8 9 10 |
# File 'lib/pingpp/coupon_template.rb', line 8 def self.object_name 'coupon_template' end |