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

#is_location_valid ⇒ Object

Returns the value of attribute is_location_valid.



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

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

#pii_cleared ⇒ Object

Returns the value of attribute pii_cleared.



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

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

#vat_number_status ⇒ Object

Returns the value of attribute vat_number_status.



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

def vat_number_status
  @vat_number_status
end

#vat_number_validated_time ⇒ Object

Returns the value of attribute vat_number_validated_time.



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

def vat_number_validated_time
  @vat_number_validated_time
end

Class Method Details

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



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

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



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

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



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

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



108
109
110
# File 'lib/chargebee/models/customer.rb', line 108

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

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



116
117
118
# File 'lib/chargebee/models/customer.rb', line 116

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

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



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

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

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



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

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

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

OPERATIONS



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

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



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

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



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

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



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

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



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

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

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



112
113
114
# File 'lib/chargebee/models/customer.rb', line 112

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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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