Class: HelpScout::Customer::Address

Inherits:
Object
  • Object
show all
Defined in:
lib/helpscout/models.rb

Overview

Customer::Address developer.helpscout.net/objects/customer/address/

Name        Type            Example               Notes
id          Int             1234                  Unique identifier
lines       Array                                 Collection of strings 
                                                  representing the 
                                                  customer's street 
                                                  address.
city        String          Dallas   
state       String          TX   
postalCode  String          74206  
country     String          US   
createdAt   DateTime        2012-07-23T12:34:12Z  UTC time when this 
                                                  address was created.
modifiedAt  DateTime        2012-07-24T20:18:33Z  UTC time when this 
                                                  address was modified.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ Address

Creates a new Address object from a Hash of attributes



634
635
636
637
638
639
640
641
642
643
644
# File 'lib/helpscout/models.rb', line 634

def initialize(object)
  @createdAt = DateTime.iso8601(object["createdAt"]) if object["createdAt"]
  @modifiedAt = DateTime.iso8601(object["modifiedAt"]) if object["modifiedAt"]
  
  @id = object["id"]
  @lines = object["lines"]
  @city = object["city"]
  @state = object["state"]
  @postalCode = object["postalCode"]
  @country = object["country"]
end

Instance Attribute Details

#cityObject (readonly)

Returns the value of attribute city.



631
632
633
# File 'lib/helpscout/models.rb', line 631

def city
  @city
end

#countryObject (readonly)

Returns the value of attribute country.



631
632
633
# File 'lib/helpscout/models.rb', line 631

def country
  @country
end

#createdAtObject (readonly)

Returns the value of attribute createdAt.



631
632
633
# File 'lib/helpscout/models.rb', line 631

def createdAt
  @createdAt
end

#idObject (readonly)

Returns the value of attribute id.



631
632
633
# File 'lib/helpscout/models.rb', line 631

def id
  @id
end

#linesObject (readonly)

Returns the value of attribute lines.



631
632
633
# File 'lib/helpscout/models.rb', line 631

def lines
  @lines
end

#modifiedAtObject (readonly)

Returns the value of attribute modifiedAt.



631
632
633
# File 'lib/helpscout/models.rb', line 631

def modifiedAt
  @modifiedAt
end

#postalCodeObject (readonly)

Returns the value of attribute postalCode.



631
632
633
# File 'lib/helpscout/models.rb', line 631

def postalCode
  @postalCode
end

#stateObject (readonly)

Returns the value of attribute state.



631
632
633
# File 'lib/helpscout/models.rb', line 631

def state
  @state
end