Class: Unit::DepositAccount
Instance Attribute Summary
Attributes inherited from APIResource
#id, #raw_data, #relationships, #type
Instance Method Summary
collapse
included
#save
included
included
Methods inherited from APIResource
#as_json_api, attribute, #attributes, belongs_to, build_resource_from_json_api, #clear_attributes!, connection, #dirty?, #dirty_attributes, has_many, #initialize, #mark_as_clean!, #mark_attribute_as_dirty, path, resource_path, #resource_type, resources_path, #schema, schema, #update_attribute, #update_resource_from_json_api
Instance Method Details
#ach_limits ⇒ Object
41
42
43
|
# File 'lib/unit-ruby/deposit_account.rb', line 41
def ach_limits
limits.ach_limits
end
|
#add_customer(customer_id) ⇒ Object
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/unit-ruby/deposit_account.rb', line 24
def add_customer(customer_id)
self.class.connection.post(
"accounts/#{id}/relationships/customers",
{
data: [{ type: 'customer', id: customer_id }]
}
)
self.class.find(id)
end
|
#card_limits ⇒ Object
45
46
47
|
# File 'lib/unit-ruby/deposit_account.rb', line 45
def card_limits
limits.card_limits
end
|
#check_deposit_limits ⇒ Object
49
50
51
|
# File 'lib/unit-ruby/deposit_account.rb', line 49
def check_deposit_limits
limits.check_deposit_limits
end
|
#limits ⇒ Object
35
36
37
38
39
|
# File 'lib/unit-ruby/deposit_account.rb', line 35
def limits
@limits ||= Types::AccountLimits.cast(
self.class.connection.get("accounts/#{id}/limits")
)
end
|