Class: ChargeBee::Customer

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

Defined Under Namespace

Classes: BillingAddress, Contact, PaymentMethod

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Model

construct, #init_dependant, #init_dependant_list, #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

#allow_direct_debit ⇒ Object

Returns the value of attribute allow_direct_debit.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def allow_direct_debit
  @allow_direct_debit
end

#auto_collection ⇒ Object

Returns the value of attribute auto_collection.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def auto_collection
  @auto_collection
end

#billing_address ⇒ Object

Returns the value of attribute billing_address.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def billing_address
  @billing_address
end

#card_status ⇒ Object

Returns the value of attribute card_status.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def card_status
  @card_status
end

#company ⇒ Object

Returns the value of attribute company.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def company
  @company
end

#contacts ⇒ Object

Returns the value of attribute contacts.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def contacts
  @contacts
end

#created_at ⇒ Object

Returns the value of attribute created_at.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def created_at
  @created_at
end

#created_from_ip ⇒ Object

Returns the value of attribute created_from_ip.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def created_from_ip
  @created_from_ip
end

#email ⇒ Object

Returns the value of attribute email.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def email
  @email
end

#entity_code ⇒ Object

Returns the value of attribute entity_code.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def entity_code
  @entity_code
end

#excess_payments ⇒ Object

Returns the value of attribute excess_payments.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def excess_payments
  @excess_payments
end

#exempt_number ⇒ Object

Returns the value of attribute exempt_number.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def exempt_number
  @exempt_number
end

#first_name ⇒ Object

Returns the value of attribute first_name.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def first_name
  @first_name
end

#fraud_flag ⇒ Object

Returns the value of attribute fraud_flag.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def fraud_flag
  @fraud_flag
end

#id ⇒ Object

Returns the value of attribute id.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def id
  @id
end

#invoice_notes ⇒ Object

Returns the value of attribute invoice_notes.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def invoice_notes
  @invoice_notes
end

#last_name ⇒ Object

Returns the value of attribute last_name.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def last_name
  @last_name
end

#meta_data ⇒ Object

Returns the value of attribute meta_data.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def 
  @meta_data
end

#payment_method ⇒ Object

Returns the value of attribute payment_method.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def payment_method
  @payment_method
end

#phone ⇒ Object

Returns the value of attribute phone.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def phone
  @phone
end

#promotional_credits ⇒ Object

Returns the value of attribute promotional_credits.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def promotional_credits
  @promotional_credits
end

#refundable_credits ⇒ Object

Returns the value of attribute refundable_credits.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def refundable_credits
  @refundable_credits
end

#taxability ⇒ Object

Returns the value of attribute taxability.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def taxability
  @taxability
end

#vat_number ⇒ Object

Returns the value of attribute vat_number.



16
17
18
# File 'lib/chargebee/models/customer.rb', line 16

def vat_number
  @vat_number
end

Class Method Details

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



48
49
50
# File 'lib/chargebee/models/customer.rb', line 48

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

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



60
61
62
# File 'lib/chargebee/models/customer.rb', line 60

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

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

OPERATIONS



24
25
26
# File 'lib/chargebee/models/customer.rb', line 24

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

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



64
65
66
# File 'lib/chargebee/models/customer.rb', line 64

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

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



76
77
78
# File 'lib/chargebee/models/customer.rb', line 76

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

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



56
57
58
# File 'lib/chargebee/models/customer.rb', line 56

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

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



28
29
30
# File 'lib/chargebee/models/customer.rb', line 28

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

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



72
73
74
# File 'lib/chargebee/models/customer.rb', line 72

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

.retrieve(id, env = nil, headers = {}) ⇒ Object



32
33
34
# File 'lib/chargebee/models/customer.rb', line 32

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

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



68
69
70
# File 'lib/chargebee/models/customer.rb', line 68

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

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



36
37
38
# File 'lib/chargebee/models/customer.rb', line 36

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

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



44
45
46
# File 'lib/chargebee/models/customer.rb', line 44

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

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



52
53
54
# File 'lib/chargebee/models/customer.rb', line 52

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

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



40
41
42
# File 'lib/chargebee/models/customer.rb', line 40

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