Module: AuthorizeNet::Model
- Included in:
- ARB::Paging, ARB::Sorting, ARB::Subscription, ARB::SubscriptionDetail, Address, CIM::CustomerProfile, CIM::PaymentProfile, Customer, EmailReceipt, LineItem, Order, Reporting::Batch, Reporting::BatchStatistics, Reporting::FDSFilter, Reporting::ReturnedItem, Reporting::TransactionDetails, SIM::HostedPaymentForm, SIM::HostedReceiptPage, ShippingAddress
- Defined in:
- lib/authorize_net/authorize_net.rb
Overview
Provides some basic methods used by the various model classes.
Instance Method Summary collapse
-
#initialize(fields = {}) ⇒ Object
The constructor for models.
- #to_a ⇒ Object
Instance Method Details
#initialize(fields = {}) ⇒ Object
The constructor for models. Takes any of the supported attributes as key/value pairs.
132 133 134 135 136 137 138 139 |
# File 'lib/authorize_net/authorize_net.rb', line 132 def initialize(fields = {}) fields.each do |k, v| method_name = (k.to_s + '=').to_sym if self.respond_to?(method_name) self.send(method_name, v) end end end |
#to_a ⇒ Object
141 142 143 |
# File 'lib/authorize_net/authorize_net.rb', line 141 def to_a [self] end |