Class: Apruve::OrderItem
- Inherits:
-
ApruveObject
- Object
- ApruveObject
- Apruve::OrderItem
- Defined in:
- lib/apruve/resources/order_item.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#line_item_api_url ⇒ Object
Returns the value of attribute line_item_api_url.
-
#merchant_notes ⇒ Object
Returns the value of attribute merchant_notes.
-
#plan_code ⇒ Object
Returns the value of attribute plan_code.
-
#price_ea_cents ⇒ Object
Returns the value of attribute price_ea_cents.
-
#price_total_cents ⇒ Object
Returns the value of attribute price_total_cents.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#sku ⇒ Object
Returns the value of attribute sku.
-
#subscription_url ⇒ Object
Returns the value of attribute subscription_url.
-
#title ⇒ Object
Returns the value of attribute title.
-
#variant_info ⇒ Object
Returns the value of attribute variant_info.
-
#vendor ⇒ Object
Returns the value of attribute vendor.
-
#view_product_url ⇒ Object
Returns the value of attribute view_product_url.
Instance Method Summary collapse
Methods inherited from ApruveObject
#initialize, #logger, logger, #to_hash, #to_json
Constructor Details
This class inherits a constructor from Apruve::ApruveObject
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/apruve/resources/order_item.rb', line 3 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/apruve/resources/order_item.rb', line 3 def id @id end |
#line_item_api_url ⇒ Object
Returns the value of attribute line_item_api_url.
3 4 5 |
# File 'lib/apruve/resources/order_item.rb', line 3 def line_item_api_url @line_item_api_url end |
#merchant_notes ⇒ Object
Returns the value of attribute merchant_notes.
3 4 5 |
# File 'lib/apruve/resources/order_item.rb', line 3 def merchant_notes @merchant_notes end |
#plan_code ⇒ Object
Returns the value of attribute plan_code.
3 4 5 |
# File 'lib/apruve/resources/order_item.rb', line 3 def plan_code @plan_code end |
#price_ea_cents ⇒ Object
Returns the value of attribute price_ea_cents.
3 4 5 |
# File 'lib/apruve/resources/order_item.rb', line 3 def price_ea_cents @price_ea_cents end |
#price_total_cents ⇒ Object
Returns the value of attribute price_total_cents.
3 4 5 |
# File 'lib/apruve/resources/order_item.rb', line 3 def price_total_cents @price_total_cents end |
#quantity ⇒ Object
Returns the value of attribute quantity.
3 4 5 |
# File 'lib/apruve/resources/order_item.rb', line 3 def quantity @quantity end |
#sku ⇒ Object
Returns the value of attribute sku.
3 4 5 |
# File 'lib/apruve/resources/order_item.rb', line 3 def sku @sku end |
#subscription_url ⇒ Object
Returns the value of attribute subscription_url.
3 4 5 |
# File 'lib/apruve/resources/order_item.rb', line 3 def subscription_url @subscription_url end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/apruve/resources/order_item.rb', line 3 def title @title end |
#variant_info ⇒ Object
Returns the value of attribute variant_info.
3 4 5 |
# File 'lib/apruve/resources/order_item.rb', line 3 def variant_info @variant_info end |
#vendor ⇒ Object
Returns the value of attribute vendor.
3 4 5 |
# File 'lib/apruve/resources/order_item.rb', line 3 def vendor @vendor end |
#view_product_url ⇒ Object
Returns the value of attribute view_product_url.
3 4 5 |
# File 'lib/apruve/resources/order_item.rb', line 3 def view_product_url @view_product_url end |
Instance Method Details
#validate ⇒ Object
7 8 9 10 11 |
# File 'lib/apruve/resources/order_item.rb', line 7 def validate errors = [] errors << 'title must be set on line items' if title.nil? raise Apruve::ValidationError.new(errors) if errors.length > 0 end |