Class: VoucherifySdk::LocationsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/VoucherifySdk/api/locations_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ LocationsApi

Returns a new instance of LocationsApi.



19
20
21
# File 'lib/VoucherifySdk/api/locations_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/VoucherifySdk/api/locations_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_location(location_id, opts = {}) ⇒ LocationsGetResponseBody

Get Location Returns a location object.

Parameters:

  • location_id (String)

    The unique location ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



27
28
29
30
# File 'lib/VoucherifySdk/api/locations_api.rb', line 27

def get_location(location_id, opts = {})
  data, _status_code, _headers = get_location_with_http_info(location_id, opts)
  data
end

#list_locations(opts = {}) ⇒ LocationsListResponseBody

List Locations Returns a list of your locations.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

  • :order (ParameterOrderListLocations)

    Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.

  • :filters (ParameterFiltersListLocations)

    Filter the locations using one of the available filters.

  • :end_date (Time)

    A filter on the list based on the end date. This will filter out all locations whose end date falls before the specified date and time. A date value must be presented in the ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16).

Returns:



89
90
91
92
# File 'lib/VoucherifySdk/api/locations_api.rb', line 89

def list_locations(opts = {})
  data, _status_code, _headers = list_locations_with_http_info(opts)
  data
end