Class: AlphaCard::Order
- Defined in:
- lib/alpha_card/resources/order.rb
Overview
Implementation of Alpha Card Services Order object. Contains all the information about order (id, description, etc).
Constant Summary collapse
- ORIGIN_TRANSACTION_VARIABLES =
Original AlphaCard transaction variables names
{ id: :orderid, description: :orderdescription, po_number: :ponumber, ip_address: :ipaddress }.freeze
Instance Method Summary collapse
-
#attributes_for_request ⇒ Hash
Overloaded method to return all the attributes from the sale + billing + shipping objects.
Methods included from Attribute
Instance Method Details
#attributes_for_request ⇒ Hash
Overloaded method to return all the attributes from the sale + billing + shipping objects.
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/alpha_card/resources/order.rb', line 40 def attributes_for_request(*) attributes = filled_attributes.dup billing = attributes.delete(:billing) attributes.merge!(billing.attributes_for_request) if billing shipping = attributes.delete(:shipping) attributes.merge!(shipping.attributes_for_request) if shipping super(attributes) end |