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.



5713
5714
5715
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5713

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.



5718
5719
5720
5721
5722
5723
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5718

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