Class: Pokepay::Response::Coupon
- Inherits:
-
Object
- Object
- Pokepay::Response::Coupon
- Defined in:
- lib/pokepay_partner_ruby_sdk/response/coupon.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#discount_amount ⇒ Object
readonly
Returns the value of attribute discount_amount.
-
#discount_percentage ⇒ Object
readonly
Returns the value of attribute discount_percentage.
-
#discount_upper_limit ⇒ Object
readonly
Returns the value of attribute discount_upper_limit.
-
#display_ends_at ⇒ Object
readonly
Returns the value of attribute display_ends_at.
-
#display_starts_at ⇒ Object
readonly
Returns the value of attribute display_starts_at.
-
#ends_at ⇒ Object
readonly
Returns the value of attribute ends_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#is_disabled ⇒ Object
readonly
Returns the value of attribute is_disabled.
-
#is_hidden ⇒ Object
readonly
Returns the value of attribute is_hidden.
-
#is_public ⇒ Object
readonly
Returns the value of attribute is_public.
-
#is_shop_specified ⇒ Object
readonly
Returns the value of attribute is_shop_specified.
-
#issued_shop ⇒ Object
readonly
Returns the value of attribute issued_shop.
-
#min_amount ⇒ Object
readonly
Returns the value of attribute min_amount.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#starts_at ⇒ Object
readonly
Returns the value of attribute starts_at.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
-
#usage_limit ⇒ Object
readonly
Returns the value of attribute usage_limit.
Instance Method Summary collapse
-
#initialize(row) ⇒ Coupon
constructor
A new instance of Coupon.
Constructor Details
#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 |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
44 45 46 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 44 def code @code end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
31 32 33 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 31 def description @description end |
#discount_amount ⇒ Object (readonly)
Returns the value of attribute discount_amount.
32 33 34 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 32 def discount_amount @discount_amount end |
#discount_percentage ⇒ Object (readonly)
Returns the value of attribute discount_percentage.
33 34 35 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 33 def discount_percentage @discount_percentage end |
#discount_upper_limit ⇒ Object (readonly)
Returns the value of attribute discount_upper_limit.
34 35 36 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 34 def discount_upper_limit @discount_upper_limit end |
#display_ends_at ⇒ Object (readonly)
Returns the value of attribute display_ends_at.
38 39 40 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 38 def display_ends_at @display_ends_at end |
#display_starts_at ⇒ Object (readonly)
Returns the value of attribute display_starts_at.
37 38 39 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 37 def display_starts_at @display_starts_at end |
#ends_at ⇒ Object (readonly)
Returns the value of attribute ends_at.
36 37 38 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 36 def ends_at @ends_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
28 29 30 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 28 def id @id end |
#is_disabled ⇒ Object (readonly)
Returns the value of attribute is_disabled.
45 46 47 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 45 def is_disabled @is_disabled end |
#is_hidden ⇒ Object (readonly)
Returns the value of attribute is_hidden.
42 43 44 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 42 def is_hidden @is_hidden end |
#is_public ⇒ Object (readonly)
Returns the value of attribute is_public.
43 44 45 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 43 def is_public @is_public end |
#is_shop_specified ⇒ Object (readonly)
Returns the value of attribute is_shop_specified.
41 42 43 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 41 def is_shop_specified @is_shop_specified end |
#issued_shop ⇒ Object (readonly)
Returns the value of attribute issued_shop.
30 31 32 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 30 def issued_shop @issued_shop end |
#min_amount ⇒ Object (readonly)
Returns the value of attribute min_amount.
40 41 42 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 40 def min_amount @min_amount end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
29 30 31 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 29 def name @name end |
#starts_at ⇒ Object (readonly)
Returns the value of attribute starts_at.
35 36 37 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 35 def starts_at @starts_at end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
46 47 48 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 46 def token @token end |
#usage_limit ⇒ Object (readonly)
Returns the value of attribute usage_limit.
39 40 41 |
# File 'lib/pokepay_partner_ruby_sdk/response/coupon.rb', line 39 def usage_limit @usage_limit end |