Class: AdvancedBilling::Customer
- Defined in:
- lib/advanced_billing/models/customer.rb
Overview
Customer Model.
Instance Attribute Summary collapse
-
#address ⇒ String
The customer’s shipping street address (e.g., “123 Main St.”).
-
#address_2 ⇒ String
Second line of the customer’s shipping address e.g., “Apt.
-
#branding_theme_id ⇒ Integer
The ID of the Branding Theme assigned to this customer as the customer's default Branding Theme.
-
#cc_emails ⇒ String
“A comma-separated list of emails that should be cc’d on all customer communications (e.g., “joe@example.com, sue@example.com”)”.
-
#city ⇒ String
The customer’s shipping address city (e.g., “Boston”).
-
#country ⇒ String
The customer shipping address country.
-
#country_name ⇒ String
The customer's full name of country.
-
#created_at ⇒ DateTime
The timestamp in which the customer object was created in Chargify.
-
#default_auto_renewal_profile_id ⇒ Integer
The default auto-renewal profile ID for the customer.
-
#default_subscription_group_uid ⇒ String
The locale for the customer to identify language-region.
-
#email ⇒ String
The email address of the customer.
-
#first_name ⇒ String
The first name of the customer.
-
#id ⇒ Integer
The customer ID in Chargify.
-
#last_name ⇒ String
The last name of the customer.
-
#locale ⇒ String
The locale for the customer to identify language-region.
-
#maxioid ⇒ String
The Maxio-generated unique identifier for the customer.
-
#organization ⇒ String
The organization of the customer.
-
#parent_id ⇒ Integer
The parent ID in Chargify if applicable.
-
#phone ⇒ String
The phone number of the customer.
-
#portal_customer_created_at ⇒ DateTime
The timestamp of when the Billing Portal entry was created at for the customer.
-
#portal_invite_last_accepted_at ⇒ DateTime
The timestamp of when the Billing Portal invite was last accepted.
-
#portal_invite_last_sent_at ⇒ DateTime
The timestamp of when the Billing Portal invite was last sent at.
-
#reference ⇒ String
The unique identifier used within your own application for this customer.
-
#salesforce_id ⇒ String
The Salesforce ID for the customer.
-
#state ⇒ String
The customer’s shipping address state (e.g., “MA”).
-
#state_name ⇒ String
The customer's full name of state.
-
#surcharging ⇒ TrueClass | FalseClass
Whether surcharging is enabled for the customer.
-
#tax_exempt ⇒ TrueClass | FalseClass
The tax exempt status for the customer.
-
#tax_exempt_reason ⇒ String
The Tax Exemption Reason Code for the customer.
-
#updated_at ⇒ DateTime
The timestamp in which the customer object was last edited.
-
#vat_number ⇒ String
The VAT business identification number for the customer.
-
#verified ⇒ TrueClass | FalseClass
Is the customer verified to use ACH as a payment method.
-
#zip ⇒ String
The customer’s shipping address zip code (e.g., “12345”).
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(first_name: SKIP, last_name: SKIP, email: SKIP, cc_emails: SKIP, organization: SKIP, reference: SKIP, id: SKIP, created_at: SKIP, updated_at: SKIP, address: SKIP, address_2: SKIP, city: SKIP, state: SKIP, state_name: SKIP, zip: SKIP, country: SKIP, country_name: SKIP, phone: SKIP, verified: SKIP, portal_customer_created_at: SKIP, portal_invite_last_sent_at: SKIP, portal_invite_last_accepted_at: SKIP, tax_exempt: SKIP, surcharging: SKIP, vat_number: SKIP, parent_id: SKIP, locale: SKIP, default_subscription_group_uid: SKIP, salesforce_id: SKIP, tax_exempt_reason: SKIP, default_auto_renewal_profile_id: SKIP, maxioid: SKIP, branding_theme_id: SKIP, additional_properties: {}) ⇒ Customer
constructor
A new instance of Customer.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_created_at ⇒ Object
- #to_custom_portal_customer_created_at ⇒ Object
- #to_custom_portal_invite_last_accepted_at ⇒ Object
- #to_custom_portal_invite_last_sent_at ⇒ Object
- #to_custom_updated_at ⇒ Object
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #get_additional_properties, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(first_name: SKIP, last_name: SKIP, email: SKIP, cc_emails: SKIP, organization: SKIP, reference: SKIP, id: SKIP, created_at: SKIP, updated_at: SKIP, address: SKIP, address_2: SKIP, city: SKIP, state: SKIP, state_name: SKIP, zip: SKIP, country: SKIP, country_name: SKIP, phone: SKIP, verified: SKIP, portal_customer_created_at: SKIP, portal_invite_last_sent_at: SKIP, portal_invite_last_accepted_at: SKIP, tax_exempt: SKIP, surcharging: SKIP, vat_number: SKIP, parent_id: SKIP, locale: SKIP, default_subscription_group_uid: SKIP, salesforce_id: SKIP, tax_exempt_reason: SKIP, default_auto_renewal_profile_id: SKIP, maxioid: SKIP, branding_theme_id: SKIP, additional_properties: {}) ⇒ Customer
Returns a new instance of Customer.
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/advanced_billing/models/customer.rb', line 271 def initialize(first_name: SKIP, last_name: SKIP, email: SKIP, cc_emails: SKIP, organization: SKIP, reference: SKIP, id: SKIP, created_at: SKIP, updated_at: SKIP, address: SKIP, address_2: SKIP, city: SKIP, state: SKIP, state_name: SKIP, zip: SKIP, country: SKIP, country_name: SKIP, phone: SKIP, verified: SKIP, portal_customer_created_at: SKIP, portal_invite_last_sent_at: SKIP, portal_invite_last_accepted_at: SKIP, tax_exempt: SKIP, surcharging: SKIP, vat_number: SKIP, parent_id: SKIP, locale: SKIP, default_subscription_group_uid: SKIP, salesforce_id: SKIP, tax_exempt_reason: SKIP, default_auto_renewal_profile_id: SKIP, maxioid: SKIP, branding_theme_id: SKIP, additional_properties: {}) # Add additional model properties to the instance. additional_properties.each do |_name, _value| instance_variable_set("@#{_name}", _value) end @first_name = first_name unless first_name == SKIP @last_name = last_name unless last_name == SKIP @email = email unless email == SKIP @cc_emails = cc_emails unless cc_emails == SKIP @organization = organization unless organization == SKIP @reference = reference unless reference == SKIP @id = id unless id == SKIP @created_at = created_at unless created_at == SKIP @updated_at = updated_at unless updated_at == SKIP @address = address unless address == SKIP @address_2 = address_2 unless address_2 == SKIP @city = city unless city == SKIP @state = state unless state == SKIP @state_name = state_name unless state_name == SKIP @zip = zip unless zip == SKIP @country = country unless country == SKIP @country_name = country_name unless country_name == SKIP @phone = phone unless phone == SKIP @verified = verified unless verified == SKIP unless portal_customer_created_at == SKIP @portal_customer_created_at = portal_customer_created_at end unless portal_invite_last_sent_at == SKIP @portal_invite_last_sent_at = portal_invite_last_sent_at end unless portal_invite_last_accepted_at == SKIP @portal_invite_last_accepted_at = portal_invite_last_accepted_at end @tax_exempt = tax_exempt unless tax_exempt == SKIP @surcharging = surcharging unless surcharging == SKIP @vat_number = vat_number unless vat_number == SKIP @parent_id = parent_id unless parent_id == SKIP @locale = locale unless locale == SKIP unless default_subscription_group_uid == SKIP @default_subscription_group_uid = default_subscription_group_uid end @salesforce_id = salesforce_id unless salesforce_id == SKIP @tax_exempt_reason = tax_exempt_reason unless tax_exempt_reason == SKIP unless default_auto_renewal_profile_id == SKIP @default_auto_renewal_profile_id = default_auto_renewal_profile_id end @maxioid = maxioid unless maxioid == SKIP @branding_theme_id = branding_theme_id unless branding_theme_id == SKIP end |
Instance Attribute Details
#address ⇒ String
The customer’s shipping street address (e.g., “123 Main St.”)
54 55 56 |
# File 'lib/advanced_billing/models/customer.rb', line 54 def address @address end |
#address_2 ⇒ String
Second line of the customer’s shipping address e.g., “Apt. 100”
58 59 60 |
# File 'lib/advanced_billing/models/customer.rb', line 58 def address_2 @address_2 end |
#branding_theme_id ⇒ Integer
The ID of the Branding Theme assigned to this customer as the customer's default Branding Theme. This customer-level Branding Theme is used when a subscription does not have its own subscription-level Branding Theme. Available only when Branding Themes are enabled for the site.
157 158 159 |
# File 'lib/advanced_billing/models/customer.rb', line 157 def branding_theme_id @branding_theme_id end |
#cc_emails ⇒ String
“A comma-separated list of emails that should be cc’d on all customer communications (e.g., “joe@example.com, sue@example.com”)”
28 29 30 |
# File 'lib/advanced_billing/models/customer.rb', line 28 def cc_emails @cc_emails end |
#city ⇒ String
The customer’s shipping address city (e.g., “Boston”)
62 63 64 |
# File 'lib/advanced_billing/models/customer.rb', line 62 def city @city end |
#country ⇒ String
The customer shipping address country
78 79 80 |
# File 'lib/advanced_billing/models/customer.rb', line 78 def country @country end |
#country_name ⇒ String
The customer's full name of country
82 83 84 |
# File 'lib/advanced_billing/models/customer.rb', line 82 def country_name @country_name end |
#created_at ⇒ DateTime
The timestamp in which the customer object was created in Chargify
46 47 48 |
# File 'lib/advanced_billing/models/customer.rb', line 46 def created_at @created_at end |
#default_auto_renewal_profile_id ⇒ Integer
The default auto-renewal profile ID for the customer
146 147 148 |
# File 'lib/advanced_billing/models/customer.rb', line 146 def default_auto_renewal_profile_id @default_auto_renewal_profile_id end |
#default_subscription_group_uid ⇒ String
The locale for the customer to identify language-region
134 135 136 |
# File 'lib/advanced_billing/models/customer.rb', line 134 def default_subscription_group_uid @default_subscription_group_uid end |
#email ⇒ String
The email address of the customer
23 24 25 |
# File 'lib/advanced_billing/models/customer.rb', line 23 def email @email end |
#first_name ⇒ String
The first name of the customer
15 16 17 |
# File 'lib/advanced_billing/models/customer.rb', line 15 def first_name @first_name end |
#id ⇒ Integer
The customer ID in Chargify
42 43 44 |
# File 'lib/advanced_billing/models/customer.rb', line 42 def id @id end |
#last_name ⇒ String
The last name of the customer
19 20 21 |
# File 'lib/advanced_billing/models/customer.rb', line 19 def last_name @last_name end |
#locale ⇒ String
The locale for the customer to identify language-region
130 131 132 |
# File 'lib/advanced_billing/models/customer.rb', line 130 def locale @locale end |
#maxioid ⇒ String
The Maxio-generated unique identifier for the customer.
150 151 152 |
# File 'lib/advanced_billing/models/customer.rb', line 150 def maxioid @maxioid end |
#organization ⇒ String
The organization of the customer. If no value, null or empty string is
provided, organization will be populated with the customer's first and
last name, separated with a space.
34 35 36 |
# File 'lib/advanced_billing/models/customer.rb', line 34 def organization @organization end |
#parent_id ⇒ Integer
The parent ID in Chargify if applicable. Parent is another Customer object.
126 127 128 |
# File 'lib/advanced_billing/models/customer.rb', line 126 def parent_id @parent_id end |
#phone ⇒ String
The phone number of the customer
86 87 88 |
# File 'lib/advanced_billing/models/customer.rb', line 86 def phone @phone end |
#portal_customer_created_at ⇒ DateTime
The timestamp of when the Billing Portal entry was created at for the customer
95 96 97 |
# File 'lib/advanced_billing/models/customer.rb', line 95 def portal_customer_created_at @portal_customer_created_at end |
#portal_invite_last_accepted_at ⇒ DateTime
The timestamp of when the Billing Portal invite was last accepted
103 104 105 |
# File 'lib/advanced_billing/models/customer.rb', line 103 def portal_invite_last_accepted_at @portal_invite_last_accepted_at end |
#portal_invite_last_sent_at ⇒ DateTime
The timestamp of when the Billing Portal invite was last sent at
99 100 101 |
# File 'lib/advanced_billing/models/customer.rb', line 99 def portal_invite_last_sent_at @portal_invite_last_sent_at end |
#reference ⇒ String
The unique identifier used within your own application for this customer
38 39 40 |
# File 'lib/advanced_billing/models/customer.rb', line 38 def reference @reference end |
#salesforce_id ⇒ String
The Salesforce ID for the customer
138 139 140 |
# File 'lib/advanced_billing/models/customer.rb', line 138 def salesforce_id @salesforce_id end |
#state ⇒ String
The customer’s shipping address state (e.g., “MA”)
66 67 68 |
# File 'lib/advanced_billing/models/customer.rb', line 66 def state @state end |
#state_name ⇒ String
The customer's full name of state
70 71 72 |
# File 'lib/advanced_billing/models/customer.rb', line 70 def state_name @state_name end |
#surcharging ⇒ TrueClass | FalseClass
Whether surcharging is enabled for the customer. Only included on sites where surcharging control is enabled.
113 114 115 |
# File 'lib/advanced_billing/models/customer.rb', line 113 def surcharging @surcharging end |
#tax_exempt ⇒ TrueClass | FalseClass
The tax exempt status for the customer. Acceptable values are true or 1 for true and false or 0 for false.
108 109 110 |
# File 'lib/advanced_billing/models/customer.rb', line 108 def tax_exempt @tax_exempt end |
#tax_exempt_reason ⇒ String
The Tax Exemption Reason Code for the customer
142 143 144 |
# File 'lib/advanced_billing/models/customer.rb', line 142 def tax_exempt_reason @tax_exempt_reason end |
#updated_at ⇒ DateTime
The timestamp in which the customer object was last edited
50 51 52 |
# File 'lib/advanced_billing/models/customer.rb', line 50 def updated_at @updated_at end |
#vat_number ⇒ String
The VAT business identification number for the customer. This number is used to determine VAT tax opt out rules. It is not validated when added or updated on a customer record. Instead, it is validated via VIES before calculating taxes. Only valid business identification numbers will allow for VAT opt out.
121 122 123 |
# File 'lib/advanced_billing/models/customer.rb', line 121 def vat_number @vat_number end |
#verified ⇒ TrueClass | FalseClass
Is the customer verified to use ACH as a payment method.
90 91 92 |
# File 'lib/advanced_billing/models/customer.rb', line 90 def verified @verified end |
#zip ⇒ String
The customer’s shipping address zip code (e.g., “12345”)
74 75 76 |
# File 'lib/advanced_billing/models/customer.rb', line 74 def zip @zip end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'lib/advanced_billing/models/customer.rb', line 340 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. first_name = hash.key?('first_name') ? hash['first_name'] : SKIP last_name = hash.key?('last_name') ? hash['last_name'] : SKIP email = hash.key?('email') ? hash['email'] : SKIP cc_emails = hash.key?('cc_emails') ? hash['cc_emails'] : SKIP organization = hash.key?('organization') ? hash['organization'] : SKIP reference = hash.key?('reference') ? hash['reference'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP created_at = if hash.key?('created_at') (DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at']) else SKIP end updated_at = if hash.key?('updated_at') (DateTimeHelper.from_rfc3339(hash['updated_at']) if hash['updated_at']) else SKIP end address = hash.key?('address') ? hash['address'] : SKIP address_2 = hash.key?('address_2') ? hash['address_2'] : SKIP city = hash.key?('city') ? hash['city'] : SKIP state = hash.key?('state') ? hash['state'] : SKIP state_name = hash.key?('state_name') ? hash['state_name'] : SKIP zip = hash.key?('zip') ? hash['zip'] : SKIP country = hash.key?('country') ? hash['country'] : SKIP country_name = hash.key?('country_name') ? hash['country_name'] : SKIP phone = hash.key?('phone') ? hash['phone'] : SKIP verified = hash.key?('verified') ? hash['verified'] : SKIP portal_customer_created_at = if hash.key?('portal_customer_created_at') (DateTimeHelper.from_rfc3339(hash['portal_customer_created_at']) if hash['portal_customer_created_at']) else SKIP end portal_invite_last_sent_at = if hash.key?('portal_invite_last_sent_at') (DateTimeHelper.from_rfc3339(hash['portal_invite_last_sent_at']) if hash['portal_invite_last_sent_at']) else SKIP end portal_invite_last_accepted_at = if hash.key?('portal_invite_last_accepted_at') (DateTimeHelper.from_rfc3339(hash['portal_invite_last_accepted_at']) if hash['portal_invite_last_accepted_at']) else SKIP end tax_exempt = hash.key?('tax_exempt') ? hash['tax_exempt'] : SKIP surcharging = hash.key?('surcharging') ? hash['surcharging'] : SKIP vat_number = hash.key?('vat_number') ? hash['vat_number'] : SKIP parent_id = hash.key?('parent_id') ? hash['parent_id'] : SKIP locale = hash.key?('locale') ? hash['locale'] : SKIP default_subscription_group_uid = hash.key?('default_subscription_group_uid') ? hash['default_subscription_group_uid'] : SKIP salesforce_id = hash.key?('salesforce_id') ? hash['salesforce_id'] : SKIP tax_exempt_reason = hash.key?('tax_exempt_reason') ? hash['tax_exempt_reason'] : SKIP default_auto_renewal_profile_id = hash.key?('default_auto_renewal_profile_id') ? hash['default_auto_renewal_profile_id'] : SKIP maxioid = hash.key?('maxioid') ? hash['maxioid'] : SKIP branding_theme_id = hash.key?('branding_theme_id') ? hash['branding_theme_id'] : SKIP # Clean out expected properties from Hash. additional_properties = hash.reject { |k, _| names.value?(k) } # Create object from extracted values. Customer.new(first_name: first_name, last_name: last_name, email: email, cc_emails: cc_emails, organization: organization, reference: reference, id: id, created_at: created_at, updated_at: updated_at, address: address, address_2: address_2, city: city, state: state, state_name: state_name, zip: zip, country: country, country_name: country_name, phone: phone, verified: verified, portal_customer_created_at: portal_customer_created_at, portal_invite_last_sent_at: portal_invite_last_sent_at, portal_invite_last_accepted_at: portal_invite_last_accepted_at, tax_exempt: tax_exempt, surcharging: surcharging, vat_number: vat_number, parent_id: parent_id, locale: locale, default_subscription_group_uid: default_subscription_group_uid, salesforce_id: salesforce_id, tax_exempt_reason: tax_exempt_reason, default_auto_renewal_profile_id: default_auto_renewal_profile_id, maxioid: maxioid, branding_theme_id: branding_theme_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/advanced_billing/models/customer.rb', line 160 def self.names @_hash = {} if @_hash.nil? @_hash['first_name'] = 'first_name' @_hash['last_name'] = 'last_name' @_hash['email'] = 'email' @_hash['cc_emails'] = 'cc_emails' @_hash['organization'] = 'organization' @_hash['reference'] = 'reference' @_hash['id'] = 'id' @_hash['created_at'] = 'created_at' @_hash['updated_at'] = 'updated_at' @_hash['address'] = 'address' @_hash['address_2'] = 'address_2' @_hash['city'] = 'city' @_hash['state'] = 'state' @_hash['state_name'] = 'state_name' @_hash['zip'] = 'zip' @_hash['country'] = 'country' @_hash['country_name'] = 'country_name' @_hash['phone'] = 'phone' @_hash['verified'] = 'verified' @_hash['portal_customer_created_at'] = 'portal_customer_created_at' @_hash['portal_invite_last_sent_at'] = 'portal_invite_last_sent_at' @_hash['portal_invite_last_accepted_at'] = 'portal_invite_last_accepted_at' @_hash['tax_exempt'] = 'tax_exempt' @_hash['surcharging'] = 'surcharging' @_hash['vat_number'] = 'vat_number' @_hash['parent_id'] = 'parent_id' @_hash['locale'] = 'locale' @_hash['default_subscription_group_uid'] = 'default_subscription_group_uid' @_hash['salesforce_id'] = 'salesforce_id' @_hash['tax_exempt_reason'] = 'tax_exempt_reason' @_hash['default_auto_renewal_profile_id'] = 'default_auto_renewal_profile_id' @_hash['maxioid'] = 'maxioid' @_hash['branding_theme_id'] = 'branding_theme_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/advanced_billing/models/customer.rb', line 241 def self.nullables %w[ cc_emails organization reference address address_2 city state state_name zip country country_name phone verified portal_customer_created_at portal_invite_last_sent_at portal_invite_last_accepted_at vat_number parent_id locale default_subscription_group_uid salesforce_id tax_exempt_reason default_auto_renewal_profile_id maxioid branding_theme_id ] end |
.optionals ⇒ Object
An array for optional fields
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/advanced_billing/models/customer.rb', line 202 def self.optionals %w[ first_name last_name email cc_emails organization reference id created_at updated_at address address_2 city state state_name zip country country_name phone verified portal_customer_created_at portal_invite_last_sent_at portal_invite_last_accepted_at tax_exempt surcharging vat_number parent_id locale default_subscription_group_uid salesforce_id tax_exempt_reason default_auto_renewal_profile_id maxioid branding_theme_id ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
464 465 466 467 468 469 470 |
# File 'lib/advanced_billing/models/customer.rb', line 464 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 |
# File 'lib/advanced_billing/models/customer.rb', line 492 def inspect class_name = self.class.name.split('::').last "<#{class_name} first_name: #{@first_name.inspect}, last_name: #{@last_name.inspect},"\ " email: #{@email.inspect}, cc_emails: #{@cc_emails.inspect}, organization:"\ " #{@organization.inspect}, reference: #{@reference.inspect}, id: #{@id.inspect},"\ " created_at: #{@created_at.inspect}, updated_at: #{@updated_at.inspect}, address:"\ " #{@address.inspect}, address_2: #{@address_2.inspect}, city: #{@city.inspect}, state:"\ " #{@state.inspect}, state_name: #{@state_name.inspect}, zip: #{@zip.inspect}, country:"\ " #{@country.inspect}, country_name: #{@country_name.inspect}, phone: #{@phone.inspect},"\ " verified: #{@verified.inspect}, portal_customer_created_at:"\ " #{@portal_customer_created_at.inspect}, portal_invite_last_sent_at:"\ " #{@portal_invite_last_sent_at.inspect}, portal_invite_last_accepted_at:"\ " #{@portal_invite_last_accepted_at.inspect}, tax_exempt: #{@tax_exempt.inspect},"\ " surcharging: #{@surcharging.inspect}, vat_number: #{@vat_number.inspect}, parent_id:"\ " #{@parent_id.inspect}, locale: #{@locale.inspect}, default_subscription_group_uid:"\ " #{@default_subscription_group_uid.inspect}, salesforce_id: #{@salesforce_id.inspect},"\ " tax_exempt_reason: #{@tax_exempt_reason.inspect}, default_auto_renewal_profile_id:"\ " #{@default_auto_renewal_profile_id.inspect}, maxioid: #{@maxioid.inspect},"\ " branding_theme_id: #{@branding_theme_id.inspect}, additional_properties:"\ " #{get_additional_properties}>" end |
#to_custom_created_at ⇒ Object
442 443 444 |
# File 'lib/advanced_billing/models/customer.rb', line 442 def to_custom_created_at DateTimeHelper.to_rfc3339(created_at) end |
#to_custom_portal_customer_created_at ⇒ Object
450 451 452 |
# File 'lib/advanced_billing/models/customer.rb', line 450 def to_custom_portal_customer_created_at DateTimeHelper.to_rfc3339(portal_customer_created_at) end |
#to_custom_portal_invite_last_accepted_at ⇒ Object
458 459 460 |
# File 'lib/advanced_billing/models/customer.rb', line 458 def to_custom_portal_invite_last_accepted_at DateTimeHelper.to_rfc3339(portal_invite_last_accepted_at) end |
#to_custom_portal_invite_last_sent_at ⇒ Object
454 455 456 |
# File 'lib/advanced_billing/models/customer.rb', line 454 def to_custom_portal_invite_last_sent_at DateTimeHelper.to_rfc3339(portal_invite_last_sent_at) end |
#to_custom_updated_at ⇒ Object
446 447 448 |
# File 'lib/advanced_billing/models/customer.rb', line 446 def to_custom_updated_at DateTimeHelper.to_rfc3339(updated_at) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 |
# File 'lib/advanced_billing/models/customer.rb', line 473 def to_s class_name = self.class.name.split('::').last "<#{class_name} first_name: #{@first_name}, last_name: #{@last_name}, email: #{@email},"\ " cc_emails: #{@cc_emails}, organization: #{@organization}, reference: #{@reference}, id:"\ " #{@id}, created_at: #{@created_at}, updated_at: #{@updated_at}, address: #{@address},"\ " address_2: #{@address_2}, city: #{@city}, state: #{@state}, state_name: #{@state_name},"\ " zip: #{@zip}, country: #{@country}, country_name: #{@country_name}, phone: #{@phone},"\ " verified: #{@verified}, portal_customer_created_at: #{@portal_customer_created_at},"\ " portal_invite_last_sent_at: #{@portal_invite_last_sent_at},"\ " portal_invite_last_accepted_at: #{@portal_invite_last_accepted_at}, tax_exempt:"\ " #{@tax_exempt}, surcharging: #{@surcharging}, vat_number: #{@vat_number}, parent_id:"\ " #{@parent_id}, locale: #{@locale}, default_subscription_group_uid:"\ " #{@default_subscription_group_uid}, salesforce_id: #{@salesforce_id}, tax_exempt_reason:"\ " #{@tax_exempt_reason}, default_auto_renewal_profile_id:"\ " #{@default_auto_renewal_profile_id}, maxioid: #{@maxioid}, branding_theme_id:"\ " #{@branding_theme_id}, additional_properties: #{get_additional_properties}>" end |