class Etsy::Address
Address
¶ ↑
Represents a single Etsy
Address
. Users may or may not have associated addresses.
An address has the following attributes:
- first_line
-
Street address
- second_line
-
Additional street information.
- city
- state
- country
- country_id
- state
-
The
Etsy
country id
Public Class Methods
find(*identifiers_and_options)
click to toggle source
Retrieve all of a user's addresses by user name or ID:
Etsy::Address.find('reagent')
# File lib/etsy/address.rb, line 29 def self.find(*identifiers_and_options) self.append_to_endpoint('addresses', identifiers_and_options) self.find_one_or_more('users', identifiers_and_options) end
Private Class Methods
append_to_endpoint(suffix, arguments)
click to toggle source
# File lib/etsy/address.rb, line 39 def self.append_to_endpoint(suffix, arguments) if arguments.last.class == Hash arguments.last[:append_to_endpoint] = suffix else arguments << {:append_to_endpoint => suffix} end end
Private Instance Methods
oauth()
click to toggle source
# File lib/etsy/address.rb, line 35 def oauth oauth = (token && secret) ? {:access_token => token, :access_secret => secret} : {} end