Sha256: 3c0f59266d0f1adb13f26951daf3ea80fb0ba191b8023347d280841f521bdc9b
Contents?: true
Size: 745 Bytes
Versions: 42
Compression:
Stored size: 745 Bytes
Contents
module Centaman class Service::CouponCheck < Centaman::Service include Centaman::JsonWrapper attr_reader :coupon_code, :product_area def after_init(args) @coupon_code = args[:coupon_code] @product_area = args[:product_area] require_args end def endpoint '/coupon_services/check' end def object_class Centaman::Object::CouponCheck end def options_hash { 'CouponCode' => coupon_code, 'ProductArea' => product_area }.to_json end def required_fields [coupon_code, product_area] end def require_args raise "coupon_code and product_area required for #{self.class.name}" if required_fields.include?(nil) end end end
Version data entries
42 entries across 42 versions & 1 rubygems
Version | Path |
---|---|
centaman-0.1.13 | lib/centaman/service/coupon_check.rb |
centaman-0.1.12 | lib/centaman/service/coupon_check.rb |