Class: ChargeBee::Customer

Inherits:
Model
  • Object
show all
Defined in:
lib/chargebee/models/customer.rb

Defined Under Namespace

Classes: BillingAddress

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Model

construct, #initialize, #inspect, #load, #method_missing, #to_s, uri_path

Constructor Details

This class inherits a constructor from ChargeBee::Model

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ChargeBee::Model

Instance Attribute Details

#auto_collectionObject

Returns the value of attribute auto_collection.



8
9
10
# File 'lib/chargebee/models/customer.rb', line 8

def auto_collection
  @auto_collection
end

#billing_addressObject

Returns the value of attribute billing_address.



8
9
10
# File 'lib/chargebee/models/customer.rb', line 8

def billing_address
  @billing_address
end

#card_statusObject

Returns the value of attribute card_status.



8
9
10
# File 'lib/chargebee/models/customer.rb', line 8

def card_status
  @card_status
end

#companyObject

Returns the value of attribute company.



8
9
10
# File 'lib/chargebee/models/customer.rb', line 8

def company
  @company
end

#created_atObject

Returns the value of attribute created_at.



8
9
10
# File 'lib/chargebee/models/customer.rb', line 8

def created_at
  @created_at
end

#emailObject

Returns the value of attribute email.



8
9
10
# File 'lib/chargebee/models/customer.rb', line 8

def email
  @email
end

#first_nameObject

Returns the value of attribute first_name.



8
9
10
# File 'lib/chargebee/models/customer.rb', line 8

def first_name
  @first_name
end

#idObject

Returns the value of attribute id.



8
9
10
# File 'lib/chargebee/models/customer.rb', line 8

def id
  @id
end

#last_nameObject

Returns the value of attribute last_name.



8
9
10
# File 'lib/chargebee/models/customer.rb', line 8

def last_name
  @last_name
end

#phoneObject

Returns the value of attribute phone.



8
9
10
# File 'lib/chargebee/models/customer.rb', line 8

def phone
  @phone
end

#vat_numberObject

Returns the value of attribute vat_number.



8
9
10
# File 'lib/chargebee/models/customer.rb', line 8

def vat_number
  @vat_number
end

Class Method Details

.create(params = {}, env = nil) ⇒ Object

OPERATIONS




14
15
16
# File 'lib/chargebee/models/customer.rb', line 14

def self.create(params={}, env=nil)
  Request.send('post', uri_path("customers"), params, env)
end

.list(params = {}, env = nil) ⇒ Object



18
19
20
# File 'lib/chargebee/models/customer.rb', line 18

def self.list(params={}, env=nil)
  Request.send('get', uri_path("customers"), params, env)
end

.retrieve(id, env = nil) ⇒ Object



22
23
24
# File 'lib/chargebee/models/customer.rb', line 22

def self.retrieve(id, env=nil)
  Request.send('get', uri_path("customers",id.to_s), {}, env)
end

.update(id, params = {}, env = nil) ⇒ Object



26
27
28
# File 'lib/chargebee/models/customer.rb', line 26

def self.update(id, params={}, env=nil)
  Request.send('post', uri_path("customers",id.to_s), params, env)
end

.update_billing_info(id, params = {}, env = nil) ⇒ Object



30
31
32
# File 'lib/chargebee/models/customer.rb', line 30

def self.update_billing_info(id, params={}, env=nil)
  Request.send('post', uri_path("customers",id.to_s,"update_billing_info"), params, env)
end