Class: Levelup::Endpoints::UserAddresses

Inherits:
Base
  • Object
show all
Defined in:
lib/levelup/endpoints/user_addresses.rb

Overview

Endpoint holding all functions relating to user addresses.

Instance Method Summary collapse

Instance Method Details

#create(user_address_request) ⇒ Object

Creates a specified user address. For more information on parameters, see UserAddressRequest.


7
8
9
10
# File 'lib/levelup/endpoints/user_addresses.rb', line 7

def create(user_address_request)
  build_request(user_address_request, Requests::CreateAddress).
    send_to_api(:post, endpoint_path)
end

#list(user_access_token) ⇒ Object


12
13
14
15
# File 'lib/levelup/endpoints/user_addresses.rb', line 12

def list(user_access_token)
  Requests::ListAddresses(user_access_token: user_access_token).
    send_to_api(:get, endpoint_path)
end