Class: Conekta::DiscountLine
- Inherits:
-
Resource
- Object
- Hash
- ConektaObject
- Resource
- Conekta::DiscountLine
- Defined in:
- lib/conekta/discount_line.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#code ⇒ Object
Returns the value of attribute code.
-
#parent_id ⇒ Object
Returns the value of attribute parent_id.
-
#type ⇒ Object
Returns the value of attribute type.
Attributes inherited from Resource
Attributes inherited from ConektaObject
Instance Method Summary collapse
Methods included from Operations::CustomAction
Methods included from Operations::Update
Methods included from Operations::Delete
Methods inherited from Resource
_url, #create_member_with_relation, #initialize, underscored_class
Methods inherited from ConektaObject
#class_name, class_name, #create_attr, #first, #initialize, #inspect, #last, #load_from, #set_val, #to_s, #unset_key
Constructor Details
This class inherits a constructor from Conekta::Resource
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
7 8 9 |
# File 'lib/conekta/discount_line.rb', line 7 def amount @amount end |
#code ⇒ Object
Returns the value of attribute code.
7 8 9 |
# File 'lib/conekta/discount_line.rb', line 7 def code @code end |
#parent_id ⇒ Object
Returns the value of attribute parent_id.
7 8 9 |
# File 'lib/conekta/discount_line.rb', line 7 def parent_id @parent_id end |
#type ⇒ Object
Returns the value of attribute type.
7 8 9 |
# File 'lib/conekta/discount_line.rb', line 7 def type @type end |
Instance Method Details
#_url ⇒ Object
9 10 11 12 13 |
# File 'lib/conekta/discount_line.rb', line 9 def _url ensure_id "#{self.order._url}#{self.class._url}/#{id}" end |
#delete ⇒ Object
15 16 17 |
# File 'lib/conekta/discount_line.rb', line 15 def delete self.delete_member('order', 'discount_lines') end |