class Vindi::Customer

Customers

@example

customer = Vindi::Customer.find(1)
customer.subscriptions
customer.subscriptions.active

customer = Vindi::Customer.find_by(email: "gandalf@middleearth.com")
customer.name
customer.name = "Gandalf the White"
customer.save

Public Instance Methods

subscriptions() click to toggle source

has_many :subscriptions, class_name: “Vindi::Subscription”, parent_as_param: true, group_params_with: :query

# File lib/vindi/models/customer.rb, line 25
def subscriptions
  Vindi::Subscription.where(customer_id: id)
end