Method: Pokepay::Response::Coupon#initialize

Defined in:
lib/pokepay_partner_ruby_sdk/response/coupon.rb

#initialize(row) ⇒ Coupon

Returns a new instance of Coupon.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 7

def initialize(row)
  @id = row["id"]
  @name = row["name"]
  @issued_shop = User.new(row["issued_shop"])
  @description = row["description"]
  @discount_amount = row["discount_amount"]
  @discount_percentage = row["discount_percentage"]
  @discount_upper_limit = row["discount_upper_limit"]
  @starts_at = row["starts_at"]
  @ends_at = row["ends_at"]
  @display_starts_at = row["display_starts_at"]
  @display_ends_at = row["display_ends_at"]
  @usage_limit = row["usage_limit"]
  @min_amount = row["min_amount"]
  @is_shop_specified = row["is_shop_specified"]
  @is_hidden = row["is_hidden"]
  @is_public = row["is_public"]
  @code = row["code"]
  @is_disabled = row["is_disabled"]
  @token = row["token"]
end