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

#deleted ⇒ Object

Returns the value of attribute deleted.



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

def deleted
  @deleted
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

#locale ⇒ Object

Returns the value of attribute locale.



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

def locale
  @locale
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

#net_term_days ⇒ Object

Returns the value of attribute net_term_days.



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

def net_term_days
  @net_term_days
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

#preferred_currency_code ⇒ Object

Returns the value of attribute preferred_currency_code.



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

def preferred_currency_code
  @preferred_currency_code
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

#resource_version ⇒ Object

Returns the value of attribute resource_version.



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

def resource_version
  @resource_version
end

#taxability ⇒ Object

Returns the value of attribute taxability.



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

def taxability
  @taxability
end

#updated_at ⇒ Object

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
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



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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