Class: Beanie::CustomerAddress
- Defined in:
- lib/beanie/customer_address.rb
Instance Attribute Summary collapse
-
#address1 ⇒ Object
Returns the value of attribute address1.
-
#address2 ⇒ Object
Returns the value of attribute address2.
-
#address3 ⇒ Object
Returns the value of attribute address3.
-
#city ⇒ Object
Returns the value of attribute city.
-
#country_id ⇒ Object
Returns the value of attribute country_id.
-
#customer_id ⇒ Object
Returns the value of attribute customer_id.
-
#email ⇒ Object
Returns the value of attribute email.
-
#id ⇒ Object
Returns the value of attribute id.
-
#label ⇒ Object
Returns the value of attribute label.
-
#name ⇒ Object
Returns the value of attribute name.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#state_county ⇒ Object
Returns the value of attribute state_county.
-
#website ⇒ Object
Returns the value of attribute website.
-
#zip_postcode ⇒ Object
Returns the value of attribute zip_postcode.
Instance Method Summary collapse
-
#construct_path(opts = {}) ⇒ Object
Construct the path a little differently…
-
#initialize ⇒ CustomerAddress
constructor
Initialize instance variables.
Methods inherited from Api
all, build_url, delete, #extract, #field_name, find, get, #object_name, #populate, post, put, #save!, set_headers
Constructor Details
#initialize ⇒ CustomerAddress
Initialize instance variables
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/beanie/customer_address.rb', line 37 def initialize @id = nil @customer_id = nil @label = nil @name = nil @address1 = nil @address2 = nil @address3 = nil @city = nil @state_county = nil @zip_postcode = nil @country = nil @email = nil @phone = nil @website = nil end |
Instance Attribute Details
#address1 ⇒ Object
Returns the value of attribute address1.
32 33 34 |
# File 'lib/beanie/customer_address.rb', line 32 def address1 @address1 end |
#address2 ⇒ Object
Returns the value of attribute address2.
32 33 34 |
# File 'lib/beanie/customer_address.rb', line 32 def address2 @address2 end |
#address3 ⇒ Object
Returns the value of attribute address3.
32 33 34 |
# File 'lib/beanie/customer_address.rb', line 32 def address3 @address3 end |
#city ⇒ Object
Returns the value of attribute city.
32 33 34 |
# File 'lib/beanie/customer_address.rb', line 32 def city @city end |
#country_id ⇒ Object
Returns the value of attribute country_id.
33 34 35 |
# File 'lib/beanie/customer_address.rb', line 33 def country_id @country_id end |
#customer_id ⇒ Object
Returns the value of attribute customer_id.
32 33 34 |
# File 'lib/beanie/customer_address.rb', line 32 def customer_id @customer_id end |
#email ⇒ Object
Returns the value of attribute email.
33 34 35 |
# File 'lib/beanie/customer_address.rb', line 33 def email @email end |
#id ⇒ Object
Returns the value of attribute id.
32 33 34 |
# File 'lib/beanie/customer_address.rb', line 32 def id @id end |
#label ⇒ Object
Returns the value of attribute label.
32 33 34 |
# File 'lib/beanie/customer_address.rb', line 32 def label @label end |
#name ⇒ Object
Returns the value of attribute name.
32 33 34 |
# File 'lib/beanie/customer_address.rb', line 32 def name @name end |
#phone ⇒ Object
Returns the value of attribute phone.
33 34 35 |
# File 'lib/beanie/customer_address.rb', line 33 def phone @phone end |
#state_county ⇒ Object
Returns the value of attribute state_county.
33 34 35 |
# File 'lib/beanie/customer_address.rb', line 33 def state_county @state_county end |
#website ⇒ Object
Returns the value of attribute website.
33 34 35 |
# File 'lib/beanie/customer_address.rb', line 33 def website @website end |
#zip_postcode ⇒ Object
Returns the value of attribute zip_postcode.
33 34 35 |
# File 'lib/beanie/customer_address.rb', line 33 def zip_postcode @zip_postcode end |
Instance Method Details
#construct_path(opts = {}) ⇒ Object
Construct the path a little differently…
56 57 58 59 60 61 |
# File 'lib/beanie/customer_address.rb', line 56 def construct_path(opts = {}) raise ":customer_id is not defined" unless opts[:customer_id] path = "/customers/#{opts[:customer_id]}/customer_addresses" opts.delete(:customer_id) path end |