Class: ChargeBee::Customer

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

Defined Under Namespace

Classes: Balance, BillingAddress, Contact, PaymentMethod, ReferralUrl

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.



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

def allow_direct_debit
  @allow_direct_debit
end

#auto_collection ⇒ Object

Returns the value of attribute auto_collection.



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

def auto_collection
  @auto_collection
end

#backup_payment_source_id ⇒ Object

Returns the value of attribute backup_payment_source_id.



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

def backup_payment_source_id
  @backup_payment_source_id
end

#balances ⇒ Object

Returns the value of attribute balances.



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

def balances
  @balances
end

#billing_address ⇒ Object

Returns the value of attribute billing_address.



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

def billing_address
  @billing_address
end

#billing_date ⇒ Object

Returns the value of attribute billing_date.



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

def billing_date
  @billing_date
end

#billing_date_mode ⇒ Object

Returns the value of attribute billing_date_mode.



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

def billing_date_mode
  @billing_date_mode
end

#billing_day_of_week ⇒ Object

Returns the value of attribute billing_day_of_week.



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

def billing_day_of_week
  @billing_day_of_week
end

#billing_day_of_week_mode ⇒ Object

Returns the value of attribute billing_day_of_week_mode.



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

def billing_day_of_week_mode
  @billing_day_of_week_mode
end

#card_status ⇒ Object

Returns the value of attribute card_status.



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

def card_status
  @card_status
end

#company ⇒ Object

Returns the value of attribute company.



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

def company
  @company
end

#consolidated_invoicing ⇒ Object

Returns the value of attribute consolidated_invoicing.



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

def consolidated_invoicing
  @consolidated_invoicing
end

#contacts ⇒ Object

Returns the value of attribute contacts.



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

def contacts
  @contacts
end

#created_at ⇒ Object

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#created_from_ip ⇒ Object

Returns the value of attribute created_from_ip.



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

def created_from_ip
  @created_from_ip
end

#deleted ⇒ Object

Returns the value of attribute deleted.



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

def deleted
  @deleted
end

#email ⇒ Object

Returns the value of attribute email.



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

def email
  @email
end

#entity_code ⇒ Object

Returns the value of attribute entity_code.



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

def entity_code
  @entity_code
end

#excess_payments ⇒ Object

Returns the value of attribute excess_payments.



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

def excess_payments
  @excess_payments
end

#exempt_number ⇒ Object

Returns the value of attribute exempt_number.



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

def exempt_number
  @exempt_number
end

#first_name ⇒ Object

Returns the value of attribute first_name.



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

def first_name
  @first_name
end

#fraud_flag ⇒ Object

Returns the value of attribute fraud_flag.



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

def fraud_flag
  @fraud_flag
end

#id ⇒ Object

Returns the value of attribute id.



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

def id
  @id
end

#invoice_notes ⇒ Object

Returns the value of attribute invoice_notes.



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

def invoice_notes
  @invoice_notes
end

#last_name ⇒ Object

Returns the value of attribute last_name.



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

def last_name
  @last_name
end

#locale ⇒ Object

Returns the value of attribute locale.



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

def locale
  @locale
end

#meta_data ⇒ Object

Returns the value of attribute meta_data.



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

def 
  @meta_data
end

#net_term_days ⇒ Object

Returns the value of attribute net_term_days.



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

def net_term_days
  @net_term_days
end

#payment_method ⇒ Object

Returns the value of attribute payment_method.



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

def payment_method
  @payment_method
end

#phone ⇒ Object

Returns the value of attribute phone.



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

def phone
  @phone
end

#preferred_currency_code ⇒ Object

Returns the value of attribute preferred_currency_code.



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

def preferred_currency_code
  @preferred_currency_code
end

#primary_payment_source_id ⇒ Object

Returns the value of attribute primary_payment_source_id.



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

def primary_payment_source_id
  @primary_payment_source_id
end

#promotional_credits ⇒ Object

Returns the value of attribute promotional_credits.



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

def promotional_credits
  @promotional_credits
end

#referral_urls ⇒ Object

Returns the value of attribute referral_urls.



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

def referral_urls
  @referral_urls
end

#refundable_credits ⇒ Object

Returns the value of attribute refundable_credits.



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

def refundable_credits
  @refundable_credits
end

#registered_for_gst ⇒ Object

Returns the value of attribute registered_for_gst.



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

def registered_for_gst
  @registered_for_gst
end

#resource_version ⇒ Object

Returns the value of attribute resource_version.



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

def resource_version
  @resource_version
end

#taxability ⇒ Object

Returns the value of attribute taxability.



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

def taxability
  @taxability
end

#unbilled_charges ⇒ Object

Returns the value of attribute unbilled_charges.



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

def unbilled_charges
  @unbilled_charges
end

#updated_at ⇒ Object

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end

#vat_number ⇒ Object

Returns the value of attribute vat_number.



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

def vat_number
  @vat_number
end

Class Method Details

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



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

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



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

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

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



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

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

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



103
104
105
# File 'lib/chargebee/models/customer.rb', line 103

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

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



91
92
93
# File 'lib/chargebee/models/customer.rb', line 91

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

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

OPERATIONS



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

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



79
80
81
# File 'lib/chargebee/models/customer.rb', line 79

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



95
96
97
# File 'lib/chargebee/models/customer.rb', line 95

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



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

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



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

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

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



99
100
101
# File 'lib/chargebee/models/customer.rb', line 99

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

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



87
88
89
# File 'lib/chargebee/models/customer.rb', line 87

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



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

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



83
84
85
# File 'lib/chargebee/models/customer.rb', line 83

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



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

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



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

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



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

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



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

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