Class: Io::Flow::V0::Clients::CustomerAddressBook

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ CustomerAddressBook

Returns a new instance of CustomerAddressBook.



5590
5591
5592
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5590

def initialize(client)
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
end

Instance Method Details

#get(organization, number) ⇒ Object

Retrieve customer addrress book.



5595
5596
5597
5598
5599
5600
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5595

def get(organization, number)
  HttpClient::Preconditions.assert_class('organization', organization, String)
  HttpClient::Preconditions.assert_class('number', number, String)
  r = @client.request("/#{CGI.escape(organization)}/customers/#{CGI.escape(number)}/addresses/book").get
  ::Io::Flow::V0::Models::CustomerAddressBook.new(r)
end