Class: Quandoo::CustomersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/quandoo/api/customers_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CustomersApi

Returns a new instance of CustomersApi.



19
20
21
# File 'lib/quandoo/api/customers_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/quandoo/api/customers_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_customer1(customer_id, opts = {}) ⇒ CustomerResponse

Get customer Data This endpoint allows an agent to get customer information by id. Customer id both in the request and response are agent-specific. The agent needs to be authenticated. The endpoint will return ‘HTTP 404 - Not Found` if the customer with the specified id could not be found. It will return `HTTP 403 - Forbidden` if the agent is not authenticated or the agent doesn’t have permissions. ####Request: * customerId: Agent-specific ID of the customer ####Response: The response contains the following data of the customer as explained below: * id: The agent-dependent identifier of the customer * email: The given email of this customer. Optional * firstName: First name of the customer. Optional * lastName: Last name of the customer. Optional * gender: The given gender of the customer (one of MALE, FEMALE, OTHER or UNDEFINED). Optional * phoneNumber: The ID of the merchant at which this reservation was made * mobileNumber: The ID of the customer to which this reservation belongs * country: 2-letter ISO country code of the customer, e.g. DE * links: Related links that can be followed based on this response * subscriptions: The newsletter subscriptions, e.g. QUANDOO, MERCHANT Example curl: “‘ curl https://host/vX/customers/9ffb3466-3562-42cc-add1-92a46a2f0902 “` Example response: “` { "id": "9ffb3466-3562-42cc-add1-92a46a2f0902", "firstName": "Gaius", "lastName": "Octavius", "gender": "male", "email": "[email protected]", "phoneNumber": "+4917312345678", "country": "DE", "links": [ { "href": "localhost:39250/v1/customers/9ffb3466-3562-42cc-add1-92a46a2f0902/reservations", "method": "GET", "rel": "get-customer-reservations" } ], "subscriptions": [ { "id": "QUANDOO" } ] } “`

Parameters:

  • customer_id

    Id of the customer

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

    the optional parameters

Returns:



27
28
29
30
# File 'lib/quandoo/api/customers_api.rb', line 27

def get_customer1(customer_id, opts = {})
  data, _status_code, _headers = get_customer1_with_http_info(customer_id, opts)
  data
end

#get_customer1_with_http_info(customer_id, opts = {}) ⇒ Array<(CustomerResponse, Fixnum, Hash)>

Get customer Data This endpoint allows an agent to get customer information by id. Customer id both in the request and response are agent-specific. The agent needs to be authenticated. The endpoint will return &#x60;HTTP 404 - Not Found&#x60; if the customer with the specified id could not be found. It will return &#x60;HTTP 403 - Forbidden&#x60; if the agent is not authenticated or the agent doesn&#39;t have permissions. ####Request: * customerId: Agent-specific ID of the customer ####Response: The response contains the following data of the customer as explained below: * id: The agent-dependent identifier of the customer * email: The given email of this customer. Optional * firstName: First name of the customer. Optional * lastName: Last name of the customer. Optional * gender: The given gender of the customer (one of MALE, FEMALE, OTHER or UNDEFINED). Optional * phoneNumber: The ID of the merchant at which this reservation was made * mobileNumber: The ID of the customer to which this reservation belongs * country: 2-letter ISO country code of the customer, e.g. DE * links: Related links that can be followed based on this response * subscriptions: The newsletter subscriptions, e.g. QUANDOO, MERCHANT Example curl: &#x60;&#x60;&#x60; curl https://host/vX/customers/9ffb3466-3562-42cc-add1-92a46a2f0902 &#x60;&#x60;&#x60; Example response: &#x60;&#x60;&#x60; { &quot;id&quot;: &quot;9ffb3466-3562-42cc-add1-92a46a2f0902&quot;, &quot;firstName&quot;: &quot;Gaius&quot;, &quot;lastName&quot;: &quot;Octavius&quot;, &quot;gender&quot;: &quot;male&quot;, &quot;email&quot;: &quot;[email protected]&quot;, &quot;phoneNumber&quot;: &quot;+4917312345678&quot;, &quot;country&quot;: &quot;DE&quot;, &quot;links&quot;: [ { &quot;href&quot;: &quot;localhost:39250/v1/customers/9ffb3466-3562-42cc-add1-92a46a2f0902/reservations&quot;, &quot;method&quot;: &quot;GET&quot;, &quot;rel&quot;: &quot;get-customer-reservations&quot; } ], &quot;subscriptions&quot;: [ { &quot;id&quot;: &quot;QUANDOO&quot; } ] } &#x60;&#x60;&#x60;

Parameters:

  • customer_id

    Id of the customer

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

    the optional parameters

Returns:

  • (Array<(CustomerResponse, Fixnum, Hash)>)

    CustomerResponse data, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/quandoo/api/customers_api.rb', line 37

def get_customer1_with_http_info(customer_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomersApi.get_customer1 ...'
  end
  # verify the required parameter 'customer_id' is set
  if @api_client.config.client_side_validation && customer_id.nil?
    fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_customer1"
  end
  # resource path
  local_var_path = '/v1/customers/{customerId}'.sub('{' + 'customerId' + '}', customer_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['API_TOKEN']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CustomerResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomersApi#get_customer1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_customers_of_merchant1(merchant_id, opts = {}) ⇒ CustomerDataList

Get a list of Customers of a merchant This endpoint allows a third party to get a list of customers of a merchant. The list is filtered, showing only the customers that the third party system has access. Customer id is agent-specific if the customer was created by the agent. The agent needs to be authenticated. The endpoint will return ‘HTTP 404 - Not Found` if the merchant with the specified id could not be found. It will return `HTTP 403 - Forbidden` if the agent is not authenticated or the agent doesn’t have permissions. ####Request: * merchantId: Identifier of the merchant * offset: sets the starting element to be returned. Defaults to 0 when unset or malformed. * limit: maximum number of results to be returned. Value must be between 1 and 100. Defaults to 100 when unset, malformed or outside bounds. * modifiedSince: earliest date time of time window in UTC. Format: yyyy-MM-dd HH:mm:ss * modifiedUntil: latest date time of time window in UTC. Format: yyyy-MM-dd HH:mm:ss ####Response: The response contains the following data of the customer as explained below: * id: The agent-dependent identifier of the customer * title: The title of the customer. Optional * firstName: First name of the customer. Optional * lastName: Last name of the customer. Optional * email: The given email of this customer. Optional * gender: The given gender of the customer (one of MALE, FEMALE, OTHER or UNDEFINED). Optional * phoneNumber: The phone number of the customer. Optional * mobileNumber: The mobile phone number of the customer. Optional * locale: The locale of the customer. * links: Related links that can be followed based on this response * subscriptions: The newsletter subscriptions, e.g. QUANDOO, MERCHANT * statistics: The customer statistics: number of successful, cancelled and no-show reservations * createdAt: The date the customer was created. Format: yyyy-MM-ddTHH:mm:ssZ * updatedAt: The date the customer was last updated. Format: yyyy-MM-ddTHH:mm:ssZ Example curl: “‘ curl https://host/vX/merchants/1234/customers “` Example response: “` { "result": [ { "id": "9ffb3466-3562-42cc-add1-92a46a2f0902", "customerRef": "9ffb3466-3562-42cc-add1-92a46a2f0902", "marketingFlags": [ { "marketingSettingType": "NEWSLETTERS", "marketingSettingStatus": "INACTIVE" }, { "marketingSettingType": "PROMO_CODES", "marketingSettingStatus": "ACTIVE" } ], "title": "Mr.", "firstName": "John", "lastName": "Doe", "email": "[email protected]", "phoneNumber": "+493012345678", "mobileNumber": "+17712345678", "locale": "de_DE", "links": [ { "href": "localhost:39250/v1/customers/9ffb3466-3562-42cc-add1-92a46a2f0902/reservations", "method": "GET", "rel": "get-customer-reservations" } ], "subscriptions": [ { "id": "QUANDOO" } ], "statistics": { "reservationSuccessfulCount": 8, "reservationCancelledCount": 5, "reservationNoShowCount": 2 }, "createdAt": "2018-11-22T18:42:16Z", "updatedAt": "2018-11-30T18:16:02Z" } ], "offset": 0, "limit": 100 } “`

Parameters:

  • merchant_id

    Id of the merchant

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

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    offset (default to 0)

  • :limit (Integer)

    limit (default to 100)

  • :modified_since (DateTime)

    modifiedSince. Format: yyyy-MM-dd HH:mm:ss

  • :modified_until (DateTime)

    modifiedUntil. Format: yyyy-MM-dd HH:mm:ss

Returns:



81
82
83
84
# File 'lib/quandoo/api/customers_api.rb', line 81

def get_customers_of_merchant1(merchant_id, opts = {})
  data, _status_code, _headers = get_customers_of_merchant1_with_http_info(merchant_id, opts)
  data
end

#get_customers_of_merchant1_with_http_info(merchant_id, opts = {}) ⇒ Array<(CustomerDataList, Fixnum, Hash)>

Get a list of Customers of a merchant This endpoint allows a third party to get a list of customers of a merchant. The list is filtered, showing only the customers that the third party system has access. Customer id is agent-specific if the customer was created by the agent. The agent needs to be authenticated. The endpoint will return &#x60;HTTP 404 - Not Found&#x60; if the merchant with the specified id could not be found. It will return &#x60;HTTP 403 - Forbidden&#x60; if the agent is not authenticated or the agent doesn&#39;t have permissions. ####Request: * merchantId: Identifier of the merchant * offset: sets the starting element to be returned. Defaults to 0 when unset or malformed. * limit: maximum number of results to be returned. Value must be between 1 and 100. Defaults to 100 when unset, malformed or outside bounds. * modifiedSince: earliest date time of time window in UTC. Format: yyyy-MM-dd HH:mm:ss * modifiedUntil: latest date time of time window in UTC. Format: yyyy-MM-dd HH:mm:ss ####Response: The response contains the following data of the customer as explained below: * id: The agent-dependent identifier of the customer * title: The title of the customer. Optional * firstName: First name of the customer. Optional * lastName: Last name of the customer. Optional * email: The given email of this customer. Optional * gender: The given gender of the customer (one of MALE, FEMALE, OTHER or UNDEFINED). Optional * phoneNumber: The phone number of the customer. Optional * mobileNumber: The mobile phone number of the customer. Optional * locale: The locale of the customer. * links: Related links that can be followed based on this response * subscriptions: The newsletter subscriptions, e.g. QUANDOO, MERCHANT * statistics: The customer statistics: number of successful, cancelled and no-show reservations * createdAt: The date the customer was created. Format: yyyy-MM-ddTHH:mm:ssZ * updatedAt: The date the customer was last updated. Format: yyyy-MM-ddTHH:mm:ssZ Example curl: &#x60;&#x60;&#x60; curl https://host/vX/merchants/1234/customers &#x60;&#x60;&#x60; Example response: &#x60;&#x60;&#x60; { &quot;result&quot;: [ { &quot;id&quot;: &quot;9ffb3466-3562-42cc-add1-92a46a2f0902&quot;, &quot;customerRef&quot;: &quot;9ffb3466-3562-42cc-add1-92a46a2f0902&quot;, &quot;marketingFlags&quot;: [ { &quot;marketingSettingType&quot;: &quot;NEWSLETTERS&quot;, &quot;marketingSettingStatus&quot;: &quot;INACTIVE&quot; }, { &quot;marketingSettingType&quot;: &quot;PROMO_CODES&quot;, &quot;marketingSettingStatus&quot;: &quot;ACTIVE&quot; } ], &quot;title&quot;: &quot;Mr.&quot;, &quot;firstName&quot;: &quot;John&quot;, &quot;lastName&quot;: &quot;Doe&quot;, &quot;email&quot;: &quot;[email protected]&quot;, &quot;phoneNumber&quot;: &quot;+493012345678&quot;, &quot;mobileNumber&quot;: &quot;+17712345678&quot;, &quot;locale&quot;: &quot;de_DE&quot;, &quot;links&quot;: [ { &quot;href&quot;: &quot;localhost:39250/v1/customers/9ffb3466-3562-42cc-add1-92a46a2f0902/reservations&quot;, &quot;method&quot;: &quot;GET&quot;, &quot;rel&quot;: &quot;get-customer-reservations&quot; } ], &quot;subscriptions&quot;: [ { &quot;id&quot;: &quot;QUANDOO&quot; } ], &quot;statistics&quot;: { &quot;reservationSuccessfulCount&quot;: 8, &quot;reservationCancelledCount&quot;: 5, &quot;reservationNoShowCount&quot;: 2 }, &quot;createdAt&quot;: &quot;2018-11-22T18:42:16Z&quot;, &quot;updatedAt&quot;: &quot;2018-11-30T18:16:02Z&quot; } ], &quot;offset&quot;: 0, &quot;limit&quot;: 100 } &#x60;&#x60;&#x60;

Parameters:

  • merchant_id

    Id of the merchant

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

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    offset

  • :limit (Integer)

    limit

  • :modified_since (DateTime)

    modifiedSince. Format: yyyy-MM-dd HH:mm:ss

  • :modified_until (DateTime)

    modifiedUntil. Format: yyyy-MM-dd HH:mm:ss

Returns:

  • (Array<(CustomerDataList, Fixnum, Hash)>)

    CustomerDataList data, response status code and response headers



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/quandoo/api/customers_api.rb', line 95

def get_customers_of_merchant1_with_http_info(merchant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomersApi.get_customers_of_merchant1 ...'
  end
  # verify the required parameter 'merchant_id' is set
  if @api_client.config.client_side_validation && merchant_id.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_id' when calling CustomersApi.get_customers_of_merchant1"
  end
  # resource path
  local_var_path = '/v1/merchants/{merchantId}/customers'.sub('{' + 'merchantId' + '}', merchant_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'modifiedSince'] = opts[:'modified_since'] if !opts[:'modified_since'].nil?
  query_params[:'modifiedUntil'] = opts[:'modified_until'] if !opts[:'modified_until'].nil?

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['API_TOKEN']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CustomerDataList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomersApi#get_customers_of_merchant1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_reservations1(customer_id, opts = {}) ⇒ ReservationDataList

Get customer reservations This endpoint allows an agent to get reservations of a customer. The results will be filtered by agent id. Customer id in the request and reservation IDs in response are agent-specific. The agent needs to be authenticated. The endpoint will return ‘HTTP 404 - Not Found` if the customer with the specified id could not be found. It will return `HTTP 403 - Forbidden` if the agent is not authenticated or the agent doesn’t have permissions. ####Request: * customerId: Agent-specific ID of the customer ####Response: The response will be a list of reservations. Each reservation has the fields explained below: * id: The agent-dependent unique id of the reservation * number: Quandoo internal identifier of the reservation. * quandooId: The public id of this reservation on quandoo system. * status: The status of the reservation eg. CREATED, CONFIRMED, CUSTOMER CANCELED etc. * startTime: The start time of the reservation. Format: ‘yyyy-MM-ddTHH:mm:ssZ` * endTime: The end time of the reservation. Format: `yyyy-MM-ddTHH:mm:ssZ` * capacity: The capacity (people count) of the reservation * merchantId: The ID of the merchant at which this reservation was made. * customerId: The public ID of the customer to which this reservation belongs * promoCode: The promotion code associated with this reservation. Optional. * extraInfo: extra information that the customer provided for the reservation. Optional. * links: Related links that can be followed based on this response. * createdAt: The date the reservation was created. Format: `yyyy-MM-ddTHH:mm:ssZ` * updatedAt: The date the reservation was last updated. Format: `yyyy-MM-ddTHH:mm:ssZ` Example curl: “` curl https://host/vX/customers/ce0706ff-a95d-4229-a220-d21dcd175342/reservations “` Example response: “` { "reservations": [ { "id": "07f53b36-3f48-11e5-a151-feff819cdc9f", "number": 8734957, "quandooId": "07f53b36-3f48-11e5-a151-feff819cdc9f", "status": "CREATED", "startTime": "2015-06-22T12:00:00+00:00", "endTime": "2015-06-22T13:00:00+00:00", "capacity": 4, "merchantId": 1384, "customerId": "ce0706ff-a95d-4229-a220-d21dcd175342", "promocode": "SOME_CAMPAIGN_CODE", "extraInfo": "request for baby chair", "links": [ { "href": "https://host/vX/reservations/07f53b36-3f48-11e5-a151-feff819cdc9f", "method": "GET", "rel": "self" }, { "href": "https://host/vX/reservations/07f53b36-3f48-11e5-a151-feff819cdc9f", "method": "PATCH", "rel": "update" } ], "createdAt": "2015-06-01T15:21:54Z", "updatedAt": "2015-06-01T18:45:30Z" }, { "id": "d8f53b36-3f48-11e5-a151-feff819cdc7a", "number": 8734958, "quandooId": "d8f53b36-3f48-11e5-a151-feff819cdc7a", "status": "CONFIRMED", "startTime": "2015-06-22T12:00:00+00:00", "endTime": "2015-06-22T13:00:00+00:00", "capacity": 3, "merchantId": 1384, "customerId": "ce0706ff-a95d-4229-a220-d21dcd175342", "promocode": "SOME_CAMPAIGN_CODE", "links": [ { "href": "https://host/vX/reservations/d8f53b36-3f48-11e5-a151-feff819cdc7a", "method": "GET", "rel": "self" }, { "href": "https://host/vX/reservations/d8f53b36-3f48-11e5-a151-feff819cdc7a", "method": "PATCH", "rel": "update" } ], "createdAt": "2015-06-01T15:21:54Z", "updatedAt": "2015-06-01T18:45:30Z" } ] } “`

Parameters:

  • customer_id

    Id of the customer

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

    the optional parameters

Returns:



139
140
141
142
# File 'lib/quandoo/api/customers_api.rb', line 139

def get_reservations1(customer_id, opts = {})
  data, _status_code, _headers = get_reservations1_with_http_info(customer_id, opts)
  data
end

#get_reservations1_with_http_info(customer_id, opts = {}) ⇒ Array<(ReservationDataList, Fixnum, Hash)>

Get customer reservations This endpoint allows an agent to get reservations of a customer. The results will be filtered by agent id. Customer id in the request and reservation IDs in response are agent-specific. The agent needs to be authenticated. The endpoint will return &#x60;HTTP 404 - Not Found&#x60; if the customer with the specified id could not be found. It will return &#x60;HTTP 403 - Forbidden&#x60; if the agent is not authenticated or the agent doesn&#39;t have permissions. ####Request: * customerId: Agent-specific ID of the customer ####Response: The response will be a list of reservations. Each reservation has the fields explained below: * id: The agent-dependent unique id of the reservation * number: Quandoo internal identifier of the reservation. * quandooId: The public id of this reservation on quandoo system. * status: The status of the reservation eg. CREATED, CONFIRMED, CUSTOMER CANCELED etc. * startTime: The start time of the reservation. Format: &#x60;yyyy-MM-ddTHH:mm:ssZ&#x60; * endTime: The end time of the reservation. Format: &#x60;yyyy-MM-ddTHH:mm:ssZ&#x60; * capacity: The capacity (people count) of the reservation * merchantId: The ID of the merchant at which this reservation was made. * customerId: The public ID of the customer to which this reservation belongs * promoCode: The promotion code associated with this reservation. Optional. * extraInfo: extra information that the customer provided for the reservation. Optional. * links: Related links that can be followed based on this response. * createdAt: The date the reservation was created. Format: &#x60;yyyy-MM-ddTHH:mm:ssZ&#x60; * updatedAt: The date the reservation was last updated. Format: &#x60;yyyy-MM-ddTHH:mm:ssZ&#x60; Example curl: &#x60;&#x60;&#x60; curl https://host/vX/customers/ce0706ff-a95d-4229-a220-d21dcd175342/reservations &#x60;&#x60;&#x60; Example response: &#x60;&#x60;&#x60; { &quot;reservations&quot;: [ { &quot;id&quot;: &quot;07f53b36-3f48-11e5-a151-feff819cdc9f&quot;, &quot;number&quot;: 8734957, &quot;quandooId&quot;: &quot;07f53b36-3f48-11e5-a151-feff819cdc9f&quot;, &quot;status&quot;: &quot;CREATED&quot;, &quot;startTime&quot;: &quot;2015-06-22T12:00:00+00:00&quot;, &quot;endTime&quot;: &quot;2015-06-22T13:00:00+00:00&quot;, &quot;capacity&quot;: 4, &quot;merchantId&quot;: 1384, &quot;customerId&quot;: &quot;ce0706ff-a95d-4229-a220-d21dcd175342&quot;, &quot;promocode&quot;: &quot;SOME_CAMPAIGN_CODE&quot;, &quot;extraInfo&quot;: &quot;request for baby chair&quot;, &quot;links&quot;: [ { &quot;href&quot;: &quot;https://host/vX/reservations/07f53b36-3f48-11e5-a151-feff819cdc9f&quot;, &quot;method&quot;: &quot;GET&quot;, &quot;rel&quot;: &quot;self&quot; }, { &quot;href&quot;: &quot;https://host/vX/reservations/07f53b36-3f48-11e5-a151-feff819cdc9f&quot;, &quot;method&quot;: &quot;PATCH&quot;, &quot;rel&quot;: &quot;update&quot; } ], &quot;createdAt&quot;: &quot;2015-06-01T15:21:54Z&quot;, &quot;updatedAt&quot;: &quot;2015-06-01T18:45:30Z&quot; }, { &quot;id&quot;: &quot;d8f53b36-3f48-11e5-a151-feff819cdc7a&quot;, &quot;number&quot;: 8734958, &quot;quandooId&quot;: &quot;d8f53b36-3f48-11e5-a151-feff819cdc7a&quot;, &quot;status&quot;: &quot;CONFIRMED&quot;, &quot;startTime&quot;: &quot;2015-06-22T12:00:00+00:00&quot;, &quot;endTime&quot;: &quot;2015-06-22T13:00:00+00:00&quot;, &quot;capacity&quot;: 3, &quot;merchantId&quot;: 1384, &quot;customerId&quot;: &quot;ce0706ff-a95d-4229-a220-d21dcd175342&quot;, &quot;promocode&quot;: &quot;SOME_CAMPAIGN_CODE&quot;, &quot;links&quot;: [ { &quot;href&quot;: &quot;https://host/vX/reservations/d8f53b36-3f48-11e5-a151-feff819cdc7a&quot;, &quot;method&quot;: &quot;GET&quot;, &quot;rel&quot;: &quot;self&quot; }, { &quot;href&quot;: &quot;https://host/vX/reservations/d8f53b36-3f48-11e5-a151-feff819cdc7a&quot;, &quot;method&quot;: &quot;PATCH&quot;, &quot;rel&quot;: &quot;update&quot; } ], &quot;createdAt&quot;: &quot;2015-06-01T15:21:54Z&quot;, &quot;updatedAt&quot;: &quot;2015-06-01T18:45:30Z&quot; } ] } &#x60;&#x60;&#x60;

Parameters:

  • customer_id

    Id of the customer

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

    the optional parameters

Returns:

  • (Array<(ReservationDataList, Fixnum, Hash)>)

    ReservationDataList data, response status code and response headers



149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/quandoo/api/customers_api.rb', line 149

def get_reservations1_with_http_info(customer_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CustomersApi.get_reservations1 ...'
  end
  # verify the required parameter 'customer_id' is set
  if @api_client.config.client_side_validation && customer_id.nil?
    fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_reservations1"
  end
  # resource path
  local_var_path = '/v1/customers/{customerId}/reservations'.sub('{' + 'customerId' + '}', customer_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['API_TOKEN']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ReservationDataList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CustomersApi#get_reservations1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end