Class: Registrar::Provider::Enom::Order
- Inherits:
-
Object
- Object
- Registrar::Provider::Enom::Order
- Defined in:
- lib/registrar/provider/enom/order.rb
Overview
An Enom order.
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#order_date ⇒ Object
Returns the value of attribute order_date.
-
#order_status ⇒ Object
Returns the value of attribute order_status.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(id) ⇒ Order
constructor
A new instance of Order.
-
#to_order ⇒ Object
Get a generic Registrar::Order object to use.
Constructor Details
#initialize(id) ⇒ Order
Returns a new instance of Order.
11 12 13 |
# File 'lib/registrar/provider/enom/order.rb', line 11 def initialize(id) @id = id end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/registrar/provider/enom/order.rb', line 6 def id @id end |
#order_date ⇒ Object
Returns the value of attribute order_date.
8 9 10 |
# File 'lib/registrar/provider/enom/order.rb', line 8 def order_date @order_date end |
#order_status ⇒ Object
Returns the value of attribute order_status.
7 8 9 |
# File 'lib/registrar/provider/enom/order.rb', line 7 def order_status @order_status end |
#status ⇒ Object
Returns the value of attribute status.
9 10 11 |
# File 'lib/registrar/provider/enom/order.rb', line 9 def status @status end |
Instance Method Details
#to_order ⇒ Object
Get a generic Registrar::Order object to use.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/registrar/provider/enom/order.rb', line 24 def to_order order = Registrar::Order.new(id) order.successful = status.downcase == "successful" order.status = case order_status.downcase when 'open' then :open when 'closed' then :closed else order_status.downcase.to_sym end order.date = order_date order end |