Class: PayCertify::Gateway::Customer
- Inherits:
-
Base::Resource
- Object
- Base::Resource
- PayCertify::Gateway::Customer
- Defined in:
- lib/paycertify/gateway/customer.rb
Defined Under Namespace
Classes: Validation
Constant Summary collapse
- API_ENDPOINT =
'/ws/recurring.asmx/ManageCustomer'
- ATTRIBUTES =
[ :app_customer_id, :name, :customer_id, :type, :address, :city, :state, :zip, :phone, :fax, :email, :status ]
Instance Attribute Summary
Attributes inherited from Base::Resource
#client, #errors, #original_attributes, #response
Instance Method Summary collapse
Methods inherited from Base::Resource
#attributes, #initialize, #success?, #to_json, #validatable?, #validation
Constructor Details
This class inherits a constructor from PayCertify::Gateway::Base::Resource
Instance Method Details
#attributes_to_gateway_format ⇒ Object
20 21 22 23 24 25 |
# File 'lib/paycertify/gateway/customer.rb', line 20 def attributes_to_gateway_format formatted = super attribute_mapping = PayCertify::Gateway::AttributeMapping formatted.merge! attribute_mapping.type(self) formatted end |
#save! ⇒ Object
14 15 16 17 18 |
# File 'lib/paycertify/gateway/customer.rb', line 14 def save! super self.customer_id = self.response['response']['customer_key'] self end |