Class: Airwallex::Customer
- Inherits:
-
APIResource
- Object
- APIResource
- Airwallex::Customer
- Extended by:
- APIOperations::Create, APIOperations::Delete, APIOperations::List, APIOperations::Retrieve
- Includes:
- APIOperations::Update
- Defined in:
- lib/airwallex/resources/customer.rb
Overview
Represents a customer for organizing payment methods and transactions
Customers allow you to group payment methods and track payment history for individual users or accounts.
Instance Attribute Summary
Attributes inherited from APIResource
Class Method Summary collapse
-
.resource_path ⇒ String
API resource path for customers.
Instance Method Summary collapse
-
#payment_methods(params = {}) ⇒ ListObject<PaymentMethod>
List payment methods for this customer.
Methods included from APIOperations::Create
Methods included from APIOperations::Retrieve
Methods included from APIOperations::List
Methods included from APIOperations::Delete
Methods included from APIOperations::Update
Methods inherited from APIResource
#changed_attributes, #dirty?, #initialize, #inspect, #method_missing, #refresh, #refresh_from, resource_name, #respond_to_missing?, #to_hash, #to_json, #to_s
Constructor Details
This class inherits a constructor from Airwallex::APIResource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Airwallex::APIResource
Class Method Details
.resource_path ⇒ String
Returns API resource path for customers.
31 32 33 |
# File 'lib/airwallex/resources/customer.rb', line 31 def self.resource_path "/api/v1/pa/customers" end |
Instance Method Details
#payment_methods(params = {}) ⇒ ListObject<PaymentMethod>
List payment methods for this customer
39 40 41 |
# File 'lib/airwallex/resources/customer.rb', line 39 def payment_methods(params = {}) PaymentMethod.list(params.merge(customer_id: id)) end |