Class: SwaggerClient::ClientApi

Inherits:
Object
  • Object
show all
Defined in:
lib/swagger_client/api/client_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ClientApi

Returns a new instance of ClientApi.



19
20
21
# File 'lib/swagger_client/api/client_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/swagger_client/api/client_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#client_add_arrival(request, site_id, version, opts = {}) ⇒ AddArrivalResponse

Add an arrival for a client.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

Returns:



29
30
31
32
# File 'lib/swagger_client/api/client_api.rb', line 29

def client_add_arrival(request, site_id, version, opts = {})
  data, _status_code, _headers = client_add_arrival_with_http_info(request, site_id, version, opts)
  data
end

#client_add_arrival_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(AddArrivalResponse, Fixnum, Hash)>

Add an arrival for a client.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

Returns:

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

    AddArrivalResponse data, response status code and response headers



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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/swagger_client/api/client_api.rb', line 41

def client_add_arrival_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_add_arrival ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ClientApi.client_add_arrival"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_add_arrival"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_add_arrival"
  end
  # resource path
  local_var_path = '/public/v{version}/client/addarrival'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AddArrivalResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_add_arrival\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_add_client(request, site_id, version, opts = {}) ⇒ AddClientResponse

Add a client to a site. The ‘FirstName` and `LastName` parameters are always required in this request. All other parameters are optional, but note that any of the optional parameters could be required by a particular business, depending on how the business has configured the site settings. Use after calling the `GetRequiredClientFields` endpoint to make sure you are collecting all required pieces of information.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

Returns:



98
99
100
101
# File 'lib/swagger_client/api/client_api.rb', line 98

def client_add_client(request, site_id, version, opts = {})
  data, _status_code, _headers = client_add_client_with_http_info(request, site_id, version, opts)
  data
end

#client_add_client_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(AddClientResponse, Fixnum, Hash)>

Add a client to a site. The &#x60;FirstName&#x60; and &#x60;LastName&#x60; parameters are always required in this request. All other parameters are optional, but note that any of the optional parameters could be required by a particular business, depending on how the business has configured the site settings. Use after calling the &#x60;GetRequiredClientFields&#x60; endpoint to make sure you are collecting all required pieces of information.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

Returns:

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

    AddClientResponse data, response status code and response headers



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/swagger_client/api/client_api.rb', line 111

def client_add_client_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_add_client ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ClientApi.client_add_client"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_add_client"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_add_client"
  end
  # resource path
  local_var_path = '/public/v{version}/client/addclient'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AddClientResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_add_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_add_contact_log(request, site_id, version, opts = {}) ⇒ ContactLog

Add a contact log to a client’s account.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

Returns:



167
168
169
170
# File 'lib/swagger_client/api/client_api.rb', line 167

def client_add_contact_log(request, site_id, version, opts = {})
  data, _status_code, _headers = client_add_contact_log_with_http_info(request, site_id, version, opts)
  data
end

#client_add_contact_log_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(ContactLog, Fixnum, Hash)>

Add a contact log to a client&#39;s account.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

Returns:

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

    ContactLog data, response status code and response headers



179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# File 'lib/swagger_client/api/client_api.rb', line 179

def client_add_contact_log_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_add_contact_log ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ClientApi.client_add_contact_log"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_add_contact_log"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_add_contact_log"
  end
  # resource path
  local_var_path = '/public/v{version}/client/addcontactlog'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ContactLog')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_add_contact_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_get_active_client_memberships(request_client_id, site_id, version, opts = {}) ⇒ GetActiveClientMembershipsResponse

Get a client’s active memberships.

Parameters:

  • request_client_id

    The ID of the client whose membership was requested.

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_location_id (Integer)

    The ID of the location where the requested membership was created.

  • :request_offset (Integer)

    Page offset, defaults to 0.

Returns:



238
239
240
241
# File 'lib/swagger_client/api/client_api.rb', line 238

def client_get_active_client_memberships(request_client_id, site_id, version, opts = {})
  data, _status_code, _headers = client_get_active_client_memberships_with_http_info(request_client_id, site_id, version, opts)
  data
end

#client_get_active_client_memberships_with_http_info(request_client_id, site_id, version, opts = {}) ⇒ Array<(GetActiveClientMembershipsResponse, Fixnum, Hash)>

Get a client&#39;s active memberships.

Parameters:

  • request_client_id

    The ID of the client whose membership was requested.

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_location_id (Integer)

    The ID of the location where the requested membership was created.

  • :request_offset (Integer)

    Page offset, defaults to 0.

Returns:



253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
# File 'lib/swagger_client/api/client_api.rb', line 253

def client_get_active_client_memberships_with_http_info(request_client_id, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_active_client_memberships ...'
  end
  # verify the required parameter 'request_client_id' is set
  if @api_client.config.client_side_validation && request_client_id.nil?
    fail ArgumentError, "Missing the required parameter 'request_client_id' when calling ClientApi.client_get_active_client_memberships"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_active_client_memberships"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_active_client_memberships"
  end
  # resource path
  local_var_path = '/public/v{version}/client/activeclientmemberships'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.clientId'] = request_client_id
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.locationId'] = opts[:'request_location_id'] if !opts[:'request_location_id'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'GetActiveClientMembershipsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_active_client_memberships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_get_client_account_balances(request_client_ids, site_id, version, opts = {}) ⇒ GetClientAccountBalancesResponse

Get account balance information for one or more client(s).

Parameters:

  • request_client_ids

    The list of clients IDs for which you want account balances.

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

  • :request_balance_date (DateTime)

    The date you want a balance relative to. Default: **the current date**

  • :request_class_id (Integer)

    The class ID of the event for which you want a balance.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

Returns:



315
316
317
318
# File 'lib/swagger_client/api/client_api.rb', line 315

def (request_client_ids, site_id, version, opts = {})
  data, _status_code, _headers = (request_client_ids, site_id, version, opts)
  data
end

#client_get_client_account_balances_with_http_info(request_client_ids, site_id, version, opts = {}) ⇒ Array<(GetClientAccountBalancesResponse, Fixnum, Hash)>

Get account balance information for one or more client(s).

Parameters:

  • request_client_ids

    The list of clients IDs for which you want account balances.

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

  • :request_balance_date (DateTime)

    The date you want a balance relative to. Default: **the current date**

  • :request_class_id (Integer)

    The class ID of the event for which you want a balance.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

Returns:



331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
# File 'lib/swagger_client/api/client_api.rb', line 331

def (request_client_ids, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_client_account_balances ...'
  end
  # verify the required parameter 'request_client_ids' is set
  if @api_client.config.client_side_validation && request_client_ids.nil?
    fail ArgumentError, "Missing the required parameter 'request_client_ids' when calling ClientApi.client_get_client_account_balances"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_client_account_balances"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_client_account_balances"
  end
  # resource path
  local_var_path = '/public/v{version}/client/clientaccountbalances'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.clientIds'] = @api_client.build_collection_param(request_client_ids, :multi)
  query_params[:'request.balanceDate'] = opts[:'request_balance_date'] if !opts[:'request_balance_date'].nil?
  query_params[:'request.classId'] = opts[:'request_class_id'] if !opts[:'request_class_id'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'GetClientAccountBalancesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_client_account_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_get_client_contracts(request_client_id, site_id, version, opts = {}) ⇒ GetClientContractsResponse

Get contracts that a client has purchased.

Parameters:

  • request_client_id

    The ID of the client.

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

  • :request_client_associated_sites_offset (Integer)

    Determines how many sites are skipped over when retrieving a client’s cross regional contracts. Used when a client ID is linked to more than ten sites in an organization. Only a maximum of ten site databases are queried when this call is made and &#x60;CrossRegionalLookup&#x60; is set to &#x60;true&#x60;. To change which sites are queried, change this offset value. Default: 0

  • :request_cross_regional_lookup (BOOLEAN)

    When &#x60;true&#x60;, indicates that the requesting client’s cross regional contracts are returned, if any.&lt;br /&gt; When &#x60;false&#x60;, indicates that cross regional contracts are not returned.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

Returns:



394
395
396
397
# File 'lib/swagger_client/api/client_api.rb', line 394

def client_get_client_contracts(request_client_id, site_id, version, opts = {})
  data, _status_code, _headers = client_get_client_contracts_with_http_info(request_client_id, site_id, version, opts)
  data
end

#client_get_client_contracts_with_http_info(request_client_id, site_id, version, opts = {}) ⇒ Array<(GetClientContractsResponse, Fixnum, Hash)>

Get contracts that a client has purchased.

Parameters:

  • request_client_id

    The ID of the client.

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

  • :request_client_associated_sites_offset (Integer)

    Determines how many sites are skipped over when retrieving a client’s cross regional contracts. Used when a client ID is linked to more than ten sites in an organization. Only a maximum of ten site databases are queried when this call is made and &#x60;CrossRegionalLookup&#x60; is set to &#x60;true&#x60;. To change which sites are queried, change this offset value. Default: 0

  • :request_cross_regional_lookup (BOOLEAN)

    When &#x60;true&#x60;, indicates that the requesting client’s cross regional contracts are returned, if any.&lt;br /&gt; When &#x60;false&#x60;, indicates that cross regional contracts are not returned.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

Returns:

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

    GetClientContractsResponse data, response status code and response headers



410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
# File 'lib/swagger_client/api/client_api.rb', line 410

def client_get_client_contracts_with_http_info(request_client_id, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_client_contracts ...'
  end
  # verify the required parameter 'request_client_id' is set
  if @api_client.config.client_side_validation && request_client_id.nil?
    fail ArgumentError, "Missing the required parameter 'request_client_id' when calling ClientApi.client_get_client_contracts"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_client_contracts"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_client_contracts"
  end
  # resource path
  local_var_path = '/public/v{version}/client/clientcontracts'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.clientId'] = request_client_id
  query_params[:'request.clientAssociatedSitesOffset'] = opts[:'request_client_associated_sites_offset'] if !opts[:'request_client_associated_sites_offset'].nil?
  query_params[:'request.crossRegionalLookup'] = opts[:'request_cross_regional_lookup'] if !opts[:'request_cross_regional_lookup'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'GetClientContractsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_client_contracts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_get_client_formula_notes(site_id, version, opts = {}) ⇒ GetClientFormulaNotesResponse

Get a client’s formula notes.

Parameters:

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

  • :request_appointment_id (Integer)

    The appointment ID of the appointment that the formula notes are related to.

  • :request_client_id (String)

    The client ID of the client whose formula notes are being requested.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

Returns:



472
473
474
475
# File 'lib/swagger_client/api/client_api.rb', line 472

def client_get_client_formula_notes(site_id, version, opts = {})
  data, _status_code, _headers = client_get_client_formula_notes_with_http_info(site_id, version, opts)
  data
end

#client_get_client_formula_notes_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetClientFormulaNotesResponse, Fixnum, Hash)>

Get a client&#39;s formula notes.

Parameters:

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

  • :request_appointment_id (Integer)

    The appointment ID of the appointment that the formula notes are related to.

  • :request_client_id (String)

    The client ID of the client whose formula notes are being requested.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

Returns:



487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
# File 'lib/swagger_client/api/client_api.rb', line 487

def client_get_client_formula_notes_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_client_formula_notes ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_client_formula_notes"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_client_formula_notes"
  end
  # resource path
  local_var_path = '/public/v{version}/client/clientformulanotes'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.appointmentId'] = opts[:'request_appointment_id'] if !opts[:'request_appointment_id'].nil?
  query_params[:'request.clientId'] = opts[:'request_client_id'] if !opts[:'request_client_id'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'GetClientFormulaNotesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_client_formula_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_get_client_indexes(site_id, version, opts = {}) ⇒ GetClientIndexesResponse

Get a site’s configured client indexes and client index values. Client indexes are used to analyze client demographics. A business owner can set up different categories with sets of values which they can assign to each client. Client indexes are used in client searches, for tagging clients so that the owner can send mass emails to similar groups, and for many reports. For more information, see Client Indexes and [Client Index Values (video tutorial)](support.mindbodyonline.com/s/article/203261653-Client-indexes-and-client-index-values-video-tutorial?language=en_USclient).

Parameters:

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

  • :request_required_only (BOOLEAN)

    When &#x60;true&#x60;, filters the results to only indexes that are required on creation.&lt;br /&gt; When &#x60;false&#x60; or omitted, returns all of the client indexes.

Returns:



542
543
544
545
# File 'lib/swagger_client/api/client_api.rb', line 542

def client_get_client_indexes(site_id, version, opts = {})
  data, _status_code, _headers = client_get_client_indexes_with_http_info(site_id, version, opts)
  data
end

#client_get_client_indexes_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetClientIndexesResponse, Fixnum, Hash)>

Get a site&#39;s configured client indexes and client index values. Client indexes are used to analyze client demographics. A business owner can set up different categories with sets of values which they can assign to each client. Client indexes are used in client searches, for tagging clients so that the owner can send mass emails to similar groups, and for many reports. For more information, see Client Indexes and [Client Index Values (video tutorial)](support.mindbodyonline.com/s/article/203261653-Client-indexes-and-client-index-values-video-tutorial?language&#x3D;en_USclient).

Parameters:

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

  • :request_required_only (BOOLEAN)

    When &#x60;true&#x60;, filters the results to only indexes that are required on creation.&lt;br /&gt; When &#x60;false&#x60; or omitted, returns all of the client indexes.

Returns:

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

    GetClientIndexesResponse data, response status code and response headers



555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
# File 'lib/swagger_client/api/client_api.rb', line 555

def client_get_client_indexes_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_client_indexes ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_client_indexes"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_client_indexes"
  end
  # resource path
  local_var_path = '/public/v{version}/client/clientindexes'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.requiredOnly'] = opts[:'request_required_only'] if !opts[:'request_required_only'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'GetClientIndexesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_client_indexes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_get_client_purchases(request_client_id, site_id, version, opts = {}) ⇒ GetClientPurchasesResponse

Get a client’s purchase history.

Parameters:

  • request_client_id

    The ID of the client you are querying for purchases.

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

  • :request_end_date (DateTime)

    Filters results to purchases made before this timestamp.&lt;br /&gt; Default: **end of today**

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_sale_id (Integer)

    Filters results to the single record associated with this ID.

  • :request_start_date (DateTime)

    Filters results to purchases made on or after this timestamp.&lt;br /&gt; Default: now

Returns:



611
612
613
614
# File 'lib/swagger_client/api/client_api.rb', line 611

def client_get_client_purchases(request_client_id, site_id, version, opts = {})
  data, _status_code, _headers = client_get_client_purchases_with_http_info(request_client_id, site_id, version, opts)
  data
end

#client_get_client_purchases_with_http_info(request_client_id, site_id, version, opts = {}) ⇒ Array<(GetClientPurchasesResponse, Fixnum, Hash)>

Get a client&#39;s purchase history.

Parameters:

  • request_client_id

    The ID of the client you are querying for purchases.

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

  • :request_end_date (DateTime)

    Filters results to purchases made before this timestamp.&lt;br /&gt; Default: **end of today**

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_sale_id (Integer)

    Filters results to the single record associated with this ID.

  • :request_start_date (DateTime)

    Filters results to purchases made on or after this timestamp.&lt;br /&gt; Default: now

Returns:

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

    GetClientPurchasesResponse data, response status code and response headers



628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
# File 'lib/swagger_client/api/client_api.rb', line 628

def client_get_client_purchases_with_http_info(request_client_id, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_client_purchases ...'
  end
  # verify the required parameter 'request_client_id' is set
  if @api_client.config.client_side_validation && request_client_id.nil?
    fail ArgumentError, "Missing the required parameter 'request_client_id' when calling ClientApi.client_get_client_purchases"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_client_purchases"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_client_purchases"
  end
  # resource path
  local_var_path = '/public/v{version}/client/clientpurchases'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.clientId'] = request_client_id
  query_params[:'request.endDate'] = opts[:'request_end_date'] if !opts[:'request_end_date'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
  query_params[:'request.saleId'] = opts[:'request_sale_id'] if !opts[:'request_sale_id'].nil?
  query_params[:'request.startDate'] = opts[:'request_start_date'] if !opts[:'request_start_date'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'GetClientPurchasesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_client_purchases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_get_client_referral_types(site_id, version, opts = {}) ⇒ GetClientReferralTypesResponse

Get a site’s configured client referral types. Gets a list of referral types. Referral types are options that new clients can choose to identify how they learned about the business. Referral types are typically used for the sign-up process.

Parameters:

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

  • :request_include_inactive (BOOLEAN)

    When &#x60;true&#x60;, filters the results to include subtypes and inactive referral types.&lt;br /&gt; When &#x60;false&#x60;, includes no subtypes and only active types.

Returns:



689
690
691
692
# File 'lib/swagger_client/api/client_api.rb', line 689

def client_get_client_referral_types(site_id, version, opts = {})
  data, _status_code, _headers = client_get_client_referral_types_with_http_info(site_id, version, opts)
  data
end

#client_get_client_referral_types_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetClientReferralTypesResponse, Fixnum, Hash)>

Get a site&#39;s configured client referral types. Gets a list of referral types. Referral types are options that new clients can choose to identify how they learned about the business. Referral types are typically used for the sign-up process.

Parameters:

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

  • :request_include_inactive (BOOLEAN)

    When &#x60;true&#x60;, filters the results to include subtypes and inactive referral types.&lt;br /&gt; When &#x60;false&#x60;, includes no subtypes and only active types.

Returns:



702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
# File 'lib/swagger_client/api/client_api.rb', line 702

def client_get_client_referral_types_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_client_referral_types ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_client_referral_types"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_client_referral_types"
  end
  # resource path
  local_var_path = '/public/v{version}/client/clientreferraltypes'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.includeInactive'] = opts[:'request_include_inactive'] if !opts[:'request_include_inactive'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'GetClientReferralTypesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_client_referral_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_get_client_services(request_client_id, site_id, version, opts = {}) ⇒ GetClientServicesResponse

Get pricing options that a client has purchased.

Parameters:

  • request_client_id

    The ID of the client to query. The results are a list of pricing options that the client has purchased. Note that “service” and “pricing option” are synonymous in this section of the documentation.

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

  • :request_class_id (Integer)

    Filters results to only those pricing options that can be used to pay for this class.

  • :request_client_associated_sites_offset (Integer)

    Used to retrieve a client’s pricing options from multiple sites within an organization when the client is associated with more than ten sites. To change which ten sites are searched, change this offset value. A value of 0 means that no sites are skipped and the first ten sites are returned. You can use the &#x60;CrossRegionalClientAssociations&#x60; value from &#x60;GET CrossRegionalClientAssociations&#x60; to determine how many sites the client is associated with. Note that you must always have &#x60;CrossRegionalLookup&#x60; set to &#x60;true&#x60; to use this parameter.&lt;br /&gt; Default: 0 For example, if a client is associated with 25 sites, you need to call &#x60;GetClientServices&#x60; three times, as follows: * Use &#x60;GET CrossRegionalClientAssociations&#x60; to determine how many sites a client is associated with, which tells you how many additional calls you need to make. * Either omit &#x60;ClientAssociatedSitesOffset&#x60; or set it to 0 to return the client’s services (pricing options) from sites 1-10. * Set &#x60;ClientAssociatedSitesOffset&#x60; to 10 to return the client pricing options from sites 11-20 * Set &#x60;ClientAssociatedSitesOffset&#x60; to 20 to return the client pricing options from sites 21-25

  • :request_cross_regional_lookup (BOOLEAN)

    Used to retrieve a client’s pricing options from multiple sites within an organization. When included and set to &#x60;true&#x60;, it searches a maximum of ten sites with which this client is associated. When a client is associated with more than ten sites, use &#x60;ClientAssociatedSitesOffset&#x60; as many times as needed to search the additional sites with which the client is associated. You can use the &#x60;CrossRegionalClientAssociations&#x60; value from &#x60;GET CrossRegionalClientAssociations&#x60; to determine how many sites the client is associated with. Note that a &#x60;SiteID&#x60; is returned and populated in the &#x60;ClientServices&#x60; response when &#x60;CrossRegionalLookup&#x60; is set to &#x60;true&#x60;. Default: false

  • :request_end_date (DateTime)

    Filters results to pricing options that are valid on or before this date.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_location_ids (Array<Integer>)

    Filters results to pricing options that can be used at the listed location IDs.

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_program_ids (Array<Integer>)

    Filters results to pricing options that belong to one of the given program IDs.

  • :request_session_type_id (Integer)

    Filters results to pricing options that will pay for the given session type ID. Use this to find pricing options that will pay for a specific appointment type.

  • :request_show_active_only (BOOLEAN)

    When &#x60;true&#x60;, includes active services only. Default: false

  • :request_start_date (DateTime)

    Filters results to pricing options that are valid on or after this date.

  • :request_visit_count (Integer)

    A filter on the minimum number of visits a service can pay for.

Returns:



765
766
767
768
# File 'lib/swagger_client/api/client_api.rb', line 765

def client_get_client_services(request_client_id, site_id, version, opts = {})
  data, _status_code, _headers = client_get_client_services_with_http_info(request_client_id, site_id, version, opts)
  data
end

#client_get_client_services_with_http_info(request_client_id, site_id, version, opts = {}) ⇒ Array<(GetClientServicesResponse, Fixnum, Hash)>

Get pricing options that a client has purchased.

Parameters:

  • request_client_id

    The ID of the client to query. The results are a list of pricing options that the client has purchased. Note that “service” and “pricing option” are synonymous in this section of the documentation.

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

  • :request_class_id (Integer)

    Filters results to only those pricing options that can be used to pay for this class.

  • :request_client_associated_sites_offset (Integer)

    Used to retrieve a client’s pricing options from multiple sites within an organization when the client is associated with more than ten sites. To change which ten sites are searched, change this offset value. A value of 0 means that no sites are skipped and the first ten sites are returned. You can use the &#x60;CrossRegionalClientAssociations&#x60; value from &#x60;GET CrossRegionalClientAssociations&#x60; to determine how many sites the client is associated with. Note that you must always have &#x60;CrossRegionalLookup&#x60; set to &#x60;true&#x60; to use this parameter.&lt;br /&gt; Default: 0 For example, if a client is associated with 25 sites, you need to call &#x60;GetClientServices&#x60; three times, as follows: * Use &#x60;GET CrossRegionalClientAssociations&#x60; to determine how many sites a client is associated with, which tells you how many additional calls you need to make. * Either omit &#x60;ClientAssociatedSitesOffset&#x60; or set it to 0 to return the client’s services (pricing options) from sites 1-10. * Set &#x60;ClientAssociatedSitesOffset&#x60; to 10 to return the client pricing options from sites 11-20 * Set &#x60;ClientAssociatedSitesOffset&#x60; to 20 to return the client pricing options from sites 21-25

  • :request_cross_regional_lookup (BOOLEAN)

    Used to retrieve a client’s pricing options from multiple sites within an organization. When included and set to &#x60;true&#x60;, it searches a maximum of ten sites with which this client is associated. When a client is associated with more than ten sites, use &#x60;ClientAssociatedSitesOffset&#x60; as many times as needed to search the additional sites with which the client is associated. You can use the &#x60;CrossRegionalClientAssociations&#x60; value from &#x60;GET CrossRegionalClientAssociations&#x60; to determine how many sites the client is associated with. Note that a &#x60;SiteID&#x60; is returned and populated in the &#x60;ClientServices&#x60; response when &#x60;CrossRegionalLookup&#x60; is set to &#x60;true&#x60;. Default: false

  • :request_end_date (DateTime)

    Filters results to pricing options that are valid on or before this date.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_location_ids (Array<Integer>)

    Filters results to pricing options that can be used at the listed location IDs.

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_program_ids (Array<Integer>)

    Filters results to pricing options that belong to one of the given program IDs.

  • :request_session_type_id (Integer)

    Filters results to pricing options that will pay for the given session type ID. Use this to find pricing options that will pay for a specific appointment type.

  • :request_show_active_only (BOOLEAN)

    When &#x60;true&#x60;, includes active services only. Default: false

  • :request_start_date (DateTime)

    Filters results to pricing options that are valid on or after this date.

  • :request_visit_count (Integer)

    A filter on the minimum number of visits a service can pay for.

Returns:

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

    GetClientServicesResponse data, response status code and response headers



789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
# File 'lib/swagger_client/api/client_api.rb', line 789

def client_get_client_services_with_http_info(request_client_id, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_client_services ...'
  end
  # verify the required parameter 'request_client_id' is set
  if @api_client.config.client_side_validation && request_client_id.nil?
    fail ArgumentError, "Missing the required parameter 'request_client_id' when calling ClientApi.client_get_client_services"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_client_services"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_client_services"
  end
  # resource path
  local_var_path = '/public/v{version}/client/clientservices'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.clientId'] = request_client_id
  query_params[:'request.classId'] = opts[:'request_class_id'] if !opts[:'request_class_id'].nil?
  query_params[:'request.clientAssociatedSitesOffset'] = opts[:'request_client_associated_sites_offset'] if !opts[:'request_client_associated_sites_offset'].nil?
  query_params[:'request.crossRegionalLookup'] = opts[:'request_cross_regional_lookup'] if !opts[:'request_cross_regional_lookup'].nil?
  query_params[:'request.endDate'] = opts[:'request_end_date'] if !opts[:'request_end_date'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.locationIds'] = @api_client.build_collection_param(opts[:'request_location_ids'], :multi) if !opts[:'request_location_ids'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
  query_params[:'request.programIds'] = @api_client.build_collection_param(opts[:'request_program_ids'], :multi) if !opts[:'request_program_ids'].nil?
  query_params[:'request.sessionTypeId'] = opts[:'request_session_type_id'] if !opts[:'request_session_type_id'].nil?
  query_params[:'request.showActiveOnly'] = opts[:'request_show_active_only'] if !opts[:'request_show_active_only'].nil?
  query_params[:'request.startDate'] = opts[:'request_start_date'] if !opts[:'request_start_date'].nil?
  query_params[:'request.visitCount'] = opts[:'request_visit_count'] if !opts[:'request_visit_count'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'GetClientServicesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_client_services\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_get_client_visits(request_client_id, site_id, version, opts = {}) ⇒ GetClientVisitsResponse

Get a client’s visit history.

Parameters:

  • request_client_id

    The ID of the requested client.

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

  • :request_client_associated_sites_offset (Integer)

    The number of sites to skip when returning the site associated with a client.

  • :request_cross_regional_lookup (BOOLEAN)

    When &#x60;true&#x60;, indicates that past and scheduled client visits across all sites in the region are returned.&lt;br /&gt; When &#x60;false&#x60;, indicates that only visits at the current site are returned.

  • :request_end_date (DateTime)

    The date past which class visits are not returned. Default: **today’s date**

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_start_date (DateTime)

    The date before which class visits are not returned. Default: **the end date**

  • :request_unpaids_only (BOOLEAN)

    When &#x60;true&#x60;, indicates that only visits that have not been paid for are returned.&lt;br /&gt; When &#x60;false&#x60;, indicates that all visits are returned, regardless of whether they have been paid for.&lt;br /&gt; Default: false

Returns:



863
864
865
866
# File 'lib/swagger_client/api/client_api.rb', line 863

def client_get_client_visits(request_client_id, site_id, version, opts = {})
  data, _status_code, _headers = client_get_client_visits_with_http_info(request_client_id, site_id, version, opts)
  data
end

#client_get_client_visits_with_http_info(request_client_id, site_id, version, opts = {}) ⇒ Array<(GetClientVisitsResponse, Fixnum, Hash)>

Get a client&#39;s visit history.

Parameters:

  • request_client_id

    The ID of the requested client.

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

  • :request_client_associated_sites_offset (Integer)

    The number of sites to skip when returning the site associated with a client.

  • :request_cross_regional_lookup (BOOLEAN)

    When &#x60;true&#x60;, indicates that past and scheduled client visits across all sites in the region are returned.&lt;br /&gt; When &#x60;false&#x60;, indicates that only visits at the current site are returned.

  • :request_end_date (DateTime)

    The date past which class visits are not returned. Default: **today’s date**

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_start_date (DateTime)

    The date before which class visits are not returned. Default: **the end date**

  • :request_unpaids_only (BOOLEAN)

    When &#x60;true&#x60;, indicates that only visits that have not been paid for are returned.&lt;br /&gt; When &#x60;false&#x60;, indicates that all visits are returned, regardless of whether they have been paid for.&lt;br /&gt; Default: false

Returns:

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

    GetClientVisitsResponse data, response status code and response headers



882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
# File 'lib/swagger_client/api/client_api.rb', line 882

def client_get_client_visits_with_http_info(request_client_id, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_client_visits ...'
  end
  # verify the required parameter 'request_client_id' is set
  if @api_client.config.client_side_validation && request_client_id.nil?
    fail ArgumentError, "Missing the required parameter 'request_client_id' when calling ClientApi.client_get_client_visits"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_client_visits"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_client_visits"
  end
  # resource path
  local_var_path = '/public/v{version}/client/clientvisits'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.clientId'] = request_client_id
  query_params[:'request.clientAssociatedSitesOffset'] = opts[:'request_client_associated_sites_offset'] if !opts[:'request_client_associated_sites_offset'].nil?
  query_params[:'request.crossRegionalLookup'] = opts[:'request_cross_regional_lookup'] if !opts[:'request_cross_regional_lookup'].nil?
  query_params[:'request.endDate'] = opts[:'request_end_date'] if !opts[:'request_end_date'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
  query_params[:'request.startDate'] = opts[:'request_start_date'] if !opts[:'request_start_date'].nil?
  query_params[:'request.unpaidsOnly'] = opts[:'request_unpaids_only'] if !opts[:'request_unpaids_only'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'GetClientVisitsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_client_visits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_get_clients(site_id, version, opts = {}) ⇒ GetClientsResponse

Get clients.

Parameters:

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

  • :request_client_i_ds (Array<String>)

    The requested client IDs. Default: **all IDs** that the authenticated user’s access level allows.

  • :request_is_prospect (BOOLEAN)

    When &#x60;true&#x60;, filters the results to include only those clients marked as prospects for the business.&lt;br /&gt; When &#x60;false&#x60;, indicates that only those clients who are not marked prospects should be returned.

  • :request_last_modified_date (DateTime)

    Filters the results to include only the clients that have been modified on or after this date.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_search_text (String)

    Text to use in the search. Can include FirstName, LastName, and Email. Note that user credentials must be provided.

Returns:



949
950
951
952
# File 'lib/swagger_client/api/client_api.rb', line 949

def client_get_clients(site_id, version, opts = {})
  data, _status_code, _headers = client_get_clients_with_http_info(site_id, version, opts)
  data
end

#client_get_clients_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetClientsResponse, Fixnum, Hash)>

Get clients.

Parameters:

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

  • :request_client_i_ds (Array<String>)

    The requested client IDs. Default: **all IDs** that the authenticated user’s access level allows.

  • :request_is_prospect (BOOLEAN)

    When &#x60;true&#x60;, filters the results to include only those clients marked as prospects for the business.&lt;br /&gt; When &#x60;false&#x60;, indicates that only those clients who are not marked prospects should be returned.

  • :request_last_modified_date (DateTime)

    Filters the results to include only the clients that have been modified on or after this date.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_search_text (String)

    Text to use in the search. Can include FirstName, LastName, and Email. Note that user credentials must be provided.

Returns:

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

    GetClientsResponse data, response status code and response headers



966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
# File 'lib/swagger_client/api/client_api.rb', line 966

def client_get_clients_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_clients ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_clients"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_clients"
  end
  # resource path
  local_var_path = '/public/v{version}/client/clients'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.clientIDs'] = @api_client.build_collection_param(opts[:'request_client_i_ds'], :multi) if !opts[:'request_client_i_ds'].nil?
  query_params[:'request.isProspect'] = opts[:'request_is_prospect'] if !opts[:'request_is_prospect'].nil?
  query_params[:'request.lastModifiedDate'] = opts[:'request_last_modified_date'] if !opts[:'request_last_modified_date'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
  query_params[:'request.searchText'] = opts[:'request_search_text'] if !opts[:'request_search_text'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'GetClientsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_clients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_get_contact_logs(request_client_id, site_id, version, opts = {}) ⇒ GetContactLogsResponse

Get contact logs on a client’s account. This endpoint contains a variety of filters that can return not just all contact logs, but also system-generated contact logs, contact logs assigned to specific staff members, and contact logs of specific types or subtypes.

Parameters:

  • request_client_id

    The ID of the client whose contact logs are being requested.

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

  • :request_end_date (DateTime)

    Filters the results to contact logs created before this date.&lt;br /&gt; Default: **the start date**

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_show_system_generated (BOOLEAN)

    When &#x60;true&#x60;, system-generated contact logs are returned in the results.&lt;br /&gt; Default: false

  • :request_staff_ids (Array<Integer>)

    Filters the results to return contact logs assigned to one or more staff IDs.

  • :request_start_date (DateTime)

    Filters the results to contact logs created on or after this date.&lt;br /&gt; Default: **the current date**

  • :request_subtype_ids (Array<Integer>)

    Filters the results to contact logs assigned one or more of these subtype IDs.

  • :request_type_ids (Array<Integer>)

    Filters the results to contact logs assigned one or more of these type IDs.

Returns:



1031
1032
1033
1034
# File 'lib/swagger_client/api/client_api.rb', line 1031

def client_get_contact_logs(request_client_id, site_id, version, opts = {})
  data, _status_code, _headers = client_get_contact_logs_with_http_info(request_client_id, site_id, version, opts)
  data
end

#client_get_contact_logs_with_http_info(request_client_id, site_id, version, opts = {}) ⇒ Array<(GetContactLogsResponse, Fixnum, Hash)>

Get contact logs on a client&#39;s account. This endpoint contains a variety of filters that can return not just all contact logs, but also system-generated contact logs, contact logs assigned to specific staff members, and contact logs of specific types or subtypes.

Parameters:

  • request_client_id

    The ID of the client whose contact logs are being requested.

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

  • :request_end_date (DateTime)

    Filters the results to contact logs created before this date.&lt;br /&gt; Default: **the start date**

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_show_system_generated (BOOLEAN)

    When &#x60;true&#x60;, system-generated contact logs are returned in the results.&lt;br /&gt; Default: false

  • :request_staff_ids (Array<Integer>)

    Filters the results to return contact logs assigned to one or more staff IDs.

  • :request_start_date (DateTime)

    Filters the results to contact logs created on or after this date.&lt;br /&gt; Default: **the current date**

  • :request_subtype_ids (Array<Integer>)

    Filters the results to contact logs assigned one or more of these subtype IDs.

  • :request_type_ids (Array<Integer>)

    Filters the results to contact logs assigned one or more of these type IDs.

Returns:

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

    GetContactLogsResponse data, response status code and response headers



1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
# File 'lib/swagger_client/api/client_api.rb', line 1052

def client_get_contact_logs_with_http_info(request_client_id, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_contact_logs ...'
  end
  # verify the required parameter 'request_client_id' is set
  if @api_client.config.client_side_validation && request_client_id.nil?
    fail ArgumentError, "Missing the required parameter 'request_client_id' when calling ClientApi.client_get_contact_logs"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_contact_logs"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_contact_logs"
  end
  # resource path
  local_var_path = '/public/v{version}/client/contactlogs'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.clientId'] = request_client_id
  query_params[:'request.endDate'] = opts[:'request_end_date'] if !opts[:'request_end_date'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
  query_params[:'request.showSystemGenerated'] = opts[:'request_show_system_generated'] if !opts[:'request_show_system_generated'].nil?
  query_params[:'request.staffIds'] = @api_client.build_collection_param(opts[:'request_staff_ids'], :multi) if !opts[:'request_staff_ids'].nil?
  query_params[:'request.startDate'] = opts[:'request_start_date'] if !opts[:'request_start_date'].nil?
  query_params[:'request.subtypeIds'] = @api_client.build_collection_param(opts[:'request_subtype_ids'], :multi) if !opts[:'request_subtype_ids'].nil?
  query_params[:'request.typeIds'] = @api_client.build_collection_param(opts[:'request_type_ids'], :multi) if !opts[:'request_type_ids'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'GetContactLogsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_contact_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_get_cross_regional_client_associations(site_id, version, opts = {}) ⇒ GetCrossRegionalClientAssociationsResponse

Get a client’s cross regional site associations. Returns a list of sites that a particular client ID (also referred to as an RSSID) or a client email address is associated with in a cross-regional organization. Either the ‘ClientID` or `Email` parameter is required. If both are provided, the `ClientID` is used. Use this endpoint to retrieve information for other Public API endpoints, about the same client at multiple sites within an organization. To use this endpoint, your developer account must have been granted permission to the site’s entire organization. Note that this endpoint does not work on the Developer Sandbox site, as it is not set up for cross-regional use cases.

Parameters:

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

  • :request_client_id (String)

    Looks up the cross regional associations by the client’s ID. Either &#x60;ClientId&#x60; or &#x60;Email&#x60; must be provided. If both are provided, the &#x60;ClientId&#x60; is used by default.

  • :request_email (String)

    Looks up the cross regional associations by the client’s email address. Either &#x60;ClientId&#x60; or &#x60;Email&#x60; must be provided. If both are provided, the &#x60;ClientId&#x60; is used by default.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

Returns:



1119
1120
1121
1122
# File 'lib/swagger_client/api/client_api.rb', line 1119

def client_get_cross_regional_client_associations(site_id, version, opts = {})
  data, _status_code, _headers = client_get_cross_regional_client_associations_with_http_info(site_id, version, opts)
  data
end

#client_get_cross_regional_client_associations_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetCrossRegionalClientAssociationsResponse, Fixnum, Hash)>

Get a client&#39;s cross regional site associations. Returns a list of sites that a particular client ID (also referred to as an RSSID) or a client email address is associated with in a cross-regional organization. Either the &#x60;ClientID&#x60; or &#x60;Email&#x60; parameter is required. If both are provided, the &#x60;ClientID&#x60; is used. Use this endpoint to retrieve information for other Public API endpoints, about the same client at multiple sites within an organization. To use this endpoint, your developer account must have been granted permission to the site’s entire organization. Note that this endpoint does not work on the Developer Sandbox site, as it is not set up for cross-regional use cases.

Parameters:

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

  • :request_client_id (String)

    Looks up the cross regional associations by the client’s ID. Either &#x60;ClientId&#x60; or &#x60;Email&#x60; must be provided. If both are provided, the &#x60;ClientId&#x60; is used by default.

  • :request_email (String)

    Looks up the cross regional associations by the client’s email address. Either &#x60;ClientId&#x60; or &#x60;Email&#x60; must be provided. If both are provided, the &#x60;ClientId&#x60; is used by default.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

Returns:



1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
# File 'lib/swagger_client/api/client_api.rb', line 1135

def client_get_cross_regional_client_associations_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_cross_regional_client_associations ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_cross_regional_client_associations"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_cross_regional_client_associations"
  end
  # resource path
  local_var_path = '/public/v{version}/client/crossregionalclientassociations'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.clientId'] = opts[:'request_client_id'] if !opts[:'request_client_id'].nil?
  query_params[:'request.email'] = opts[:'request_email'] if !opts[:'request_email'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'GetCrossRegionalClientAssociationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_cross_regional_client_associations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_get_custom_client_fields(site_id, version, opts = {}) ⇒ GetCustomClientFieldsResponse

Get a site’s configured custom client fields.

Parameters:

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

Returns:



1190
1191
1192
1193
# File 'lib/swagger_client/api/client_api.rb', line 1190

def client_get_custom_client_fields(site_id, version, opts = {})
  data, _status_code, _headers = client_get_custom_client_fields_with_http_info(site_id, version, opts)
  data
end

#client_get_custom_client_fields_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetCustomClientFieldsResponse, Fixnum, Hash)>

Get a site&#39;s configured custom client fields.

Parameters:

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

Returns:



1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
# File 'lib/swagger_client/api/client_api.rb', line 1203

def client_get_custom_client_fields_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_custom_client_fields ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_custom_client_fields"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_custom_client_fields"
  end
  # resource path
  local_var_path = '/public/v{version}/client/customclientfields'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'GetCustomClientFieldsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_custom_client_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_get_required_client_fields(site_id, version, opts = {}) ⇒ GetRequiredClientFieldsResponse

Get client required fields for a site. Gets the list of fields that a new client has to fill out in business mode, specifically for the sign-up process. ‘AddClient` and `UpdateClient` validate against these fields. This endpoint has no query parameters.

Parameters:

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

Returns:



1255
1256
1257
1258
# File 'lib/swagger_client/api/client_api.rb', line 1255

def client_get_required_client_fields(site_id, version, opts = {})
  data, _status_code, _headers = client_get_required_client_fields_with_http_info(site_id, version, opts)
  data
end

#client_get_required_client_fields_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetRequiredClientFieldsResponse, Fixnum, Hash)>

Get client required fields for a site. Gets the list of fields that a new client has to fill out in business mode, specifically for the sign-up process. &#x60;AddClient&#x60; and &#x60;UpdateClient&#x60; validate against these fields. This endpoint has no query parameters.

Parameters:

  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

Returns:



1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
# File 'lib/swagger_client/api/client_api.rb', line 1267

def client_get_required_client_fields_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_get_required_client_fields ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_get_required_client_fields"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_get_required_client_fields"
  end
  # resource path
  local_var_path = '/public/v{version}/client/requiredclientfields'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'GetRequiredClientFieldsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_get_required_client_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_send_password_reset_email(request, site_id, version, opts = {}) ⇒ Object

Send a password reset email to a client.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

Returns:

  • (Object)


1317
1318
1319
1320
# File 'lib/swagger_client/api/client_api.rb', line 1317

def client_send_password_reset_email(request, site_id, version, opts = {})
  data, _status_code, _headers = client_send_password_reset_email_with_http_info(request, site_id, version, opts)
  data
end

#client_send_password_reset_email_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Send a password reset email to a client.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

Returns:

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

    Object data, response status code and response headers



1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
# File 'lib/swagger_client/api/client_api.rb', line 1329

def client_send_password_reset_email_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_send_password_reset_email ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ClientApi.client_send_password_reset_email"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_send_password_reset_email"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_send_password_reset_email"
  end
  # resource path
  local_var_path = '/public/v{version}/client/sendpasswordresetemail'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_send_password_reset_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_update_client(request, site_id, version, opts = {}) ⇒ UpdateClientResponse

Update a client at a site. Updates an existing client for a specific subscriber. Use this endpoint as follows: * If you need to update the ‘ReferredBy` parameter, use this endpoint after calling `GET ClientReferralTypes`. * When updating a client’s home location, use after calling `GET Locations`. * If you are updating a client’s stored credit card, use after calling `GET AcceptedCardTypes` so that you can make sure the card is a type that is accepted at the subscriber. If this endpoint is used on a cross-regional site, passing in a client’s RSSID and email address creates a cross-regional link. This means that the client is created in cross-regional sites where the client does not exist and `GET CrossRegionalClientAssociations` returns all appropriate cross-regional sites. When `CrossRegionalUpdate` is omitted or set to `true`, the client’s updated information is propagated to all of the region’s sites. If `CrossRegionalUpdate` is set to `false`, only the local client is updated. Note that the following items cannot be updated for a cross-regional client: * `ClientIndexes` * `ClientRelationships` * `CustomClientFields` * `SalesReps` * `SendAccountEmails` * `SendAccountTexts` * `SendPromotionalEmails` * `SendPromotionalTexts` * `SendScheduleEmails` * `SendScheduleTexts`

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

Returns:



1386
1387
1388
1389
# File 'lib/swagger_client/api/client_api.rb', line 1386

def client_update_client(request, site_id, version, opts = {})
  data, _status_code, _headers = client_update_client_with_http_info(request, site_id, version, opts)
  data
end

#client_update_client_service(request, site_id, version, opts = {}) ⇒ UpdateClientServiceResponse

Update a client’s purchase pricing option. Updates the active date and/or expiration date of a client pricing option. This request requires staff user credentials. If the active date is modified, the expiration date is also modified accordingly. If the expiration date is modified, the active date is unchanged.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

Returns:



1456
1457
1458
1459
# File 'lib/swagger_client/api/client_api.rb', line 1456

def client_update_client_service(request, site_id, version, opts = {})
  data, _status_code, _headers = client_update_client_service_with_http_info(request, site_id, version, opts)
  data
end

#client_update_client_service_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(UpdateClientServiceResponse, Fixnum, Hash)>

Update a client&#39;s purchase pricing option. Updates the active date and/or expiration date of a client pricing option. This request requires staff user credentials. If the active date is modified, the expiration date is also modified accordingly. If the expiration date is modified, the active date is unchanged.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

Returns:



1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
# File 'lib/swagger_client/api/client_api.rb', line 1469

def client_update_client_service_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_update_client_service ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ClientApi.client_update_client_service"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_update_client_service"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_update_client_service"
  end
  # resource path
  local_var_path = '/public/v{version}/client/updateclientservice'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UpdateClientServiceResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_update_client_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_update_client_visit(request, site_id, version, opts = {}) ⇒ UpdateClientVisitResponse

Update a client’s visit.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

Returns:



1525
1526
1527
1528
# File 'lib/swagger_client/api/client_api.rb', line 1525

def client_update_client_visit(request, site_id, version, opts = {})
  data, _status_code, _headers = client_update_client_visit_with_http_info(request, site_id, version, opts)
  data
end

#client_update_client_visit_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(UpdateClientVisitResponse, Fixnum, Hash)>

Update a client&#39;s visit.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

Returns:

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

    UpdateClientVisitResponse data, response status code and response headers



1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
# File 'lib/swagger_client/api/client_api.rb', line 1537

def client_update_client_visit_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_update_client_visit ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ClientApi.client_update_client_visit"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_update_client_visit"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_update_client_visit"
  end
  # resource path
  local_var_path = '/public/v{version}/client/updateclientvisit'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UpdateClientVisitResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_update_client_visit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_update_client_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(UpdateClientResponse, Fixnum, Hash)>

Update a client at a site. Updates an existing client for a specific subscriber. Use this endpoint as follows: * If you need to update the &#x60;ReferredBy&#x60; parameter, use this endpoint after calling &#x60;GET ClientReferralTypes&#x60;. * When updating a client’s home location, use after calling &#x60;GET Locations&#x60;. * If you are updating a client’s stored credit card, use after calling &#x60;GET AcceptedCardTypes&#x60; so that you can make sure the card is a type that is accepted at the subscriber. If this endpoint is used on a cross-regional site, passing in a client’s RSSID and email address creates a cross-regional link. This means that the client is created in cross-regional sites where the client does not exist and &#x60;GET CrossRegionalClientAssociations&#x60; returns all appropriate cross-regional sites. When &#x60;CrossRegionalUpdate&#x60; is omitted or set to &#x60;true&#x60;, the client’s updated information is propagated to all of the region’s sites. If &#x60;CrossRegionalUpdate&#x60; is set to &#x60;false&#x60;, only the local client is updated. Note that the following items cannot be updated for a cross-regional client: * &#x60;ClientIndexes&#x60; * &#x60;ClientRelationships&#x60; * &#x60;CustomClientFields&#x60; * &#x60;SalesReps&#x60; * &#x60;SendAccountEmails&#x60; * &#x60;SendAccountTexts&#x60; * &#x60;SendPromotionalEmails&#x60; * &#x60;SendPromotionalTexts&#x60; * &#x60;SendScheduleEmails&#x60; * &#x60;SendScheduleTexts&#x60;

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

Returns:

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

    UpdateClientResponse data, response status code and response headers



1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
# File 'lib/swagger_client/api/client_api.rb', line 1399

def client_update_client_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_update_client ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ClientApi.client_update_client"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_update_client"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_update_client"
  end
  # resource path
  local_var_path = '/public/v{version}/client/updateclient'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UpdateClientResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_update_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_update_contact_log(request, site_id, version, opts = {}) ⇒ ContactLog

Update a contact log on a client’s account.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

Returns:



1593
1594
1595
1596
# File 'lib/swagger_client/api/client_api.rb', line 1593

def client_update_contact_log(request, site_id, version, opts = {})
  data, _status_code, _headers = client_update_contact_log_with_http_info(request, site_id, version, opts)
  data
end

#client_update_contact_log_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(ContactLog, Fixnum, Hash)>

Update a contact log on a client&#39;s account.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

Returns:

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

    ContactLog data, response status code and response headers



1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
# File 'lib/swagger_client/api/client_api.rb', line 1605

def client_update_contact_log_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_update_contact_log ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ClientApi.client_update_contact_log"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_update_contact_log"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_update_contact_log"
  end
  # resource path
  local_var_path = '/public/v{version}/client/updatecontactlog'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ContactLog')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_update_contact_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_upload_client_document(request, site_id, version, opts = {}) ⇒ UploadClientDocumentResponse

Upload a document to a client’s profile. Returns a string representation of the image byte array. The maximum document size is 1MB. The maximum size file that can be uploaded is 4 MB.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

Returns:



1662
1663
1664
1665
# File 'lib/swagger_client/api/client_api.rb', line 1662

def client_upload_client_document(request, site_id, version, opts = {})
  data, _status_code, _headers = client_upload_client_document_with_http_info(request, site_id, version, opts)
  data
end

#client_upload_client_document_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(UploadClientDocumentResponse, Fixnum, Hash)>

Upload a document to a client&#39;s profile. Returns a string representation of the image byte array. The maximum document size is 1MB. The maximum size file that can be uploaded is 4 MB.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

Returns:



1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
# File 'lib/swagger_client/api/client_api.rb', line 1675

def client_upload_client_document_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_upload_client_document ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ClientApi.client_upload_client_document"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_upload_client_document"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_upload_client_document"
  end
  # resource path
  local_var_path = '/public/v{version}/client/uploadclientdocument'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UploadClientDocumentResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_upload_client_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#client_upload_client_photo(request, site_id, version, opts = {}) ⇒ UploadClientPhotoResponse

Upload a profile photo to a client’s profile. The maximum file size is 4 MB and acceptable file types are: * bmp * jpeg * gif * tiff * png

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

Returns:



1732
1733
1734
1735
# File 'lib/swagger_client/api/client_api.rb', line 1732

def client_upload_client_photo(request, site_id, version, opts = {})
  data, _status_code, _headers = client_upload_client_photo_with_http_info(request, site_id, version, opts)
  data
end

#client_upload_client_photo_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(UploadClientPhotoResponse, Fixnum, Hash)>

Upload a profile photo to a client&#39;s profile. The maximum file size is 4 MB and acceptable file types are: * bmp * jpeg * gif * tiff * png

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

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

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

Returns:

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

    UploadClientPhotoResponse data, response status code and response headers



1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
# File 'lib/swagger_client/api/client_api.rb', line 1745

def client_upload_client_photo_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClientApi.client_upload_client_photo ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling ClientApi.client_upload_client_photo"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ClientApi.client_upload_client_photo"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ClientApi.client_upload_client_photo"
  end
  # resource path
  local_var_path = '/public/v{version}/client/uploadclientphoto'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'siteId'] = site_id
  header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UploadClientPhotoResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClientApi#client_upload_client_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end