Class: Pokepay::Response::Product

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(row) ⇒ Product

Returns a new instance of Product.



6
7
8
9
10
11
12
13
14
# File 'lib/pokepay_partner_ruby_sdk/response/product.rb', line 6

def initialize(row)
  @jan_code = row["jan_code"]
  @name = row["name"]
  @unit_price = row["unit_price"]
  @price = row["price"]
  @quantity = row["quantity"]
  @is_discounted = row["is_discounted"]
  @other = row["other"]
end

Instance Attribute Details

#is_discountedObject (readonly)

Returns the value of attribute is_discounted.



20
21
22
# File 'lib/pokepay_partner_ruby_sdk/response/product.rb', line 20

def is_discounted
  @is_discounted
end

#jan_codeObject (readonly)

Returns the value of attribute jan_code.



15
16
17
# File 'lib/pokepay_partner_ruby_sdk/response/product.rb', line 15

def jan_code
  @jan_code
end

#nameObject (readonly)

Returns the value of attribute name.



16
17
18
# File 'lib/pokepay_partner_ruby_sdk/response/product.rb', line 16

def name
  @name
end

#otherObject (readonly)

Returns the value of attribute other.



21
22
23
# File 'lib/pokepay_partner_ruby_sdk/response/product.rb', line 21

def other
  @other
end

#priceObject (readonly)

Returns the value of attribute price.



18
19
20
# File 'lib/pokepay_partner_ruby_sdk/response/product.rb', line 18

def price
  @price
end

#quantityObject (readonly)

Returns the value of attribute quantity.



19
20
21
# File 'lib/pokepay_partner_ruby_sdk/response/product.rb', line 19

def quantity
  @quantity
end

#unit_priceObject (readonly)

Returns the value of attribute unit_price.



17
18
19
# File 'lib/pokepay_partner_ruby_sdk/response/product.rb', line 17

def unit_price
  @unit_price
end