class Centaman::Service::CouponCheck
Attributes
coupon_code[R]
product_area[R]
Public Instance Methods
after_init(args)
click to toggle source
# File lib/centaman/service/coupon_check.rb, line 6 def after_init(args) @coupon_code = args[:coupon_code] @product_area = args[:product_area] require_args end
endpoint()
click to toggle source
# File lib/centaman/service/coupon_check.rb, line 12 def endpoint '/coupon_services/check' end
object_class()
click to toggle source
# File lib/centaman/service/coupon_check.rb, line 16 def object_class Centaman::Object::CouponCheck end
options_hash()
click to toggle source
# File lib/centaman/service/coupon_check.rb, line 20 def options_hash { 'CouponCode' => coupon_code, 'ProductArea' => product_area }.to_json end
require_args()
click to toggle source
# File lib/centaman/service/coupon_check.rb, line 31 def require_args raise "coupon_code and product_area required for #{self.class.name}" if required_fields.include?(nil) end
required_fields()
click to toggle source
# File lib/centaman/service/coupon_check.rb, line 27 def required_fields [coupon_code, product_area] end