Class: Pokepay::Request::CreateCoupon

Inherits:
Request
  • Object
show all
Defined in:
lib/pokepay_partner_ruby_sdk/request/create_coupon.rb

Instance Attribute Summary collapse

Attributes inherited from Request

#body_params, #method, #path

Instance Method Summary collapse

Constructor Details

#initialize(private_money_id, name, starts_at, ends_at, issued_shop_id, rest_args = {}) ⇒ CreateCoupon

Returns a new instance of CreateCoupon.



7
8
9
10
11
12
13
14
15
16
# File 'lib/pokepay_partner_ruby_sdk/request/create_coupon.rb', line 7

def initialize(private_money_id, name, starts_at, ends_at, issued_shop_id, rest_args = {})
  @path = "/coupons"
  @method = "POST"
  @body_params = { "private_money_id" => private_money_id,
                   "name" => name,
                   "starts_at" => starts_at,
                   "ends_at" => ends_at,
                   "issued_shop_id" => issued_shop_id }.merge(rest_args)
  @response_class = Pokepay::Response::CouponDetail
end

Instance Attribute Details

#response_classObject (readonly)

Returns the value of attribute response_class.



17
18
19
# File 'lib/pokepay_partner_ruby_sdk/request/create_coupon.rb', line 17

def response_class
  @response_class
end