class GoCardless::Resources::Customer
Customer
objects hold the contact details for a customer. A customer can have several [customer bank accounts](developer.gocardless.com/pro/#api-endpoints-customer-bank-accounts), which in turn can have several Direct Debit [mandates](developer.gocardless.com/pro/#api-endpoints-mandates). Represents an instance of a customer resource returned from the API
Attributes
address_line1[R]
address_line2[R]
address_line3[R]
city[R]
country_code[R]
created_at[R]
email[R]
family_name[R]
given_name[R]
id[R]
metadata[R]
postal_code[R]
region[R]
Public Class Methods
new(object)
click to toggle source
initialize a resource instance @param object [Hash] an object returned from the API
# File lib/gocardless-pro/resources/customer.rb, line 48 def initialize(object) @object = object @address_line1 = object['address_line1'] @address_line2 = object['address_line2'] @address_line3 = object['address_line3'] @city = object['city'] @country_code = object['country_code'] @created_at = object['created_at'] @email = object['email'] @family_name = object['family_name'] @given_name = object['given_name'] @id = object['id'] @metadata = object['metadata'] @postal_code = object['postal_code'] @region = object['region'] end
Public Instance Methods
to_h()
click to toggle source
Provides the resource as a hash of all it’s readable attributes
# File lib/gocardless-pro/resources/customer.rb, line 67 def to_h @object end