Class: ConstantContact::Components::EventSpot::PaymentSummary
- Inherits:
-
Component
- Object
- Component
- ConstantContact::Components::EventSpot::PaymentSummary
- Defined in:
- lib/constantcontact/components/event_spot/payment_summary.rb
Instance Attribute Summary collapse
-
#order ⇒ Object
Returns the value of attribute order.
-
#payment_status ⇒ Object
Returns the value of attribute payment_status.
-
#payment_type ⇒ Object
Returns the value of attribute payment_type.
-
#promo_code ⇒ Object
Returns the value of attribute promo_code.
Class Method Summary collapse
-
.create(props) ⇒ PaymentSummary
Factory method to create an event PaymentSummary object from a hash.
Methods inherited from Component
#to_hash, to_hash_value, #to_json
Instance Attribute Details
#order ⇒ Object
Returns the value of attribute order
11 12 13 |
# File 'lib/constantcontact/components/event_spot/payment_summary.rb', line 11 def order @order end |
#payment_status ⇒ Object
Returns the value of attribute payment_status
11 12 13 |
# File 'lib/constantcontact/components/event_spot/payment_summary.rb', line 11 def payment_status @payment_status end |
#payment_type ⇒ Object
Returns the value of attribute payment_type
11 12 13 |
# File 'lib/constantcontact/components/event_spot/payment_summary.rb', line 11 def payment_type @payment_type end |
#promo_code ⇒ Object
Returns the value of attribute promo_code
11 12 13 |
# File 'lib/constantcontact/components/event_spot/payment_summary.rb', line 11 def promo_code @promo_code end |
Class Method Details
.create(props) ⇒ PaymentSummary
Factory method to create an event PaymentSummary object from a hash
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/constantcontact/components/event_spot/payment_summary.rb', line 16 def self.create(props) obj = PaymentSummary.new props.each do |key, value| key = key.to_s if key == 'order' obj.order = Components::EventSpot::RegistrantOrder.create(value) elsif key == 'promo_code' obj.promo_code = Components::EventSpot::RegistrantPromoCode.create(value) else obj.send("#{key}=", value) if obj.respond_to? key end end if props obj end |