Class: Pokepay::Response::CouponDetail

Inherits:
Object
  • Object
show all
Defined in:
lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(row) ⇒ CouponDetail

Returns a new instance of CouponDetail.



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

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"]
  @coupon_image = row["coupon_image"]
  @available_shops = row["available_shops"]
  @private_money = PrivateMoney.new(row["private_money"])
end

Instance Attribute Details

#available_shopsObject (readonly)

Returns the value of attribute available_shops.



52
53
54
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 52

def available_shops
  @available_shops
end

#codeObject (readonly)

Returns the value of attribute code.



48
49
50
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 48

def code
  @code
end

#coupon_imageObject (readonly)

Returns the value of attribute coupon_image.



51
52
53
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 51

def coupon_image
  @coupon_image
end

#descriptionObject (readonly)

Returns the value of attribute description.



35
36
37
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 35

def description
  @description
end

#discount_amountObject (readonly)

Returns the value of attribute discount_amount.



36
37
38
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 36

def discount_amount
  @discount_amount
end

#discount_percentageObject (readonly)

Returns the value of attribute discount_percentage.



37
38
39
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 37

def discount_percentage
  @discount_percentage
end

#discount_upper_limitObject (readonly)

Returns the value of attribute discount_upper_limit.



38
39
40
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 38

def discount_upper_limit
  @discount_upper_limit
end

#display_ends_atObject (readonly)

Returns the value of attribute display_ends_at.



42
43
44
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 42

def display_ends_at
  @display_ends_at
end

#display_starts_atObject (readonly)

Returns the value of attribute display_starts_at.



41
42
43
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 41

def display_starts_at
  @display_starts_at
end

#ends_atObject (readonly)

Returns the value of attribute ends_at.



40
41
42
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 40

def ends_at
  @ends_at
end

#idObject (readonly)

Returns the value of attribute id.



32
33
34
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 32

def id
  @id
end

#is_disabledObject (readonly)

Returns the value of attribute is_disabled.



49
50
51
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 49

def is_disabled
  @is_disabled
end

#is_hiddenObject (readonly)

Returns the value of attribute is_hidden.



46
47
48
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 46

def is_hidden
  @is_hidden
end

#is_publicObject (readonly)

Returns the value of attribute is_public.



47
48
49
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 47

def is_public
  @is_public
end

#is_shop_specifiedObject (readonly)

Returns the value of attribute is_shop_specified.



45
46
47
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 45

def is_shop_specified
  @is_shop_specified
end

#issued_shopObject (readonly)

Returns the value of attribute issued_shop.



34
35
36
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 34

def issued_shop
  @issued_shop
end

#min_amountObject (readonly)

Returns the value of attribute min_amount.



44
45
46
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 44

def min_amount
  @min_amount
end

#nameObject (readonly)

Returns the value of attribute name.



33
34
35
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 33

def name
  @name
end

#private_moneyObject (readonly)

Returns the value of attribute private_money.



53
54
55
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 53

def private_money
  @private_money
end

#starts_atObject (readonly)

Returns the value of attribute starts_at.



39
40
41
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 39

def starts_at
  @starts_at
end

#tokenObject (readonly)

Returns the value of attribute token.



50
51
52
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 50

def token
  @token
end

#usage_limitObject (readonly)

Returns the value of attribute usage_limit.



43
44
45
# File 'lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb', line 43

def usage_limit
  @usage_limit
end