affixapi 1.1.45 → 1.1.46

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +27 -27
  4. data/docs/Class20230301Api.md +289 -289
  5. data/docs/CoreApi.md +1 -1
  6. data/docs/{DeveloperApi.md → XHRApi.md} +111 -111
  7. data/lib/openapi_client/api/class20230301_api.rb +288 -288
  8. data/lib/openapi_client/api/core_api.rb +3 -3
  9. data/lib/openapi_client/api/management_api.rb +1 -1
  10. data/lib/openapi_client/api/official_api.rb +1 -1
  11. data/lib/openapi_client/api/{developer_api.rb → xhr_api.rb} +83 -83
  12. data/lib/openapi_client/api_client.rb +1 -1
  13. data/lib/openapi_client/api_error.rb +1 -1
  14. data/lib/openapi_client/configuration.rb +1 -1
  15. data/lib/openapi_client/models/address_no_non_null_request.rb +1 -1
  16. data/lib/openapi_client/models/address_response.rb +1 -1
  17. data/lib/openapi_client/models/client_request.rb +1 -1
  18. data/lib/openapi_client/models/client_response.rb +1 -1
  19. data/lib/openapi_client/models/company_response.rb +1 -1
  20. data/lib/openapi_client/models/create_employee_request.rb +1 -1
  21. data/lib/openapi_client/models/create_employee_request_bank_account.rb +1 -1
  22. data/lib/openapi_client/models/create_employee_request_manager.rb +1 -1
  23. data/lib/openapi_client/models/currency_request.rb +1 -1
  24. data/lib/openapi_client/models/currency_response.rb +1 -1
  25. data/lib/openapi_client/models/disconnect_response.rb +1 -1
  26. data/lib/openapi_client/models/employee_response.rb +1 -1
  27. data/lib/openapi_client/models/employment_no_null_enum_request.rb +1 -1
  28. data/lib/openapi_client/models/employment_response.rb +1 -1
  29. data/lib/openapi_client/models/group_no_null_enum_request.rb +1 -1
  30. data/lib/openapi_client/models/group_response.rb +1 -1
  31. data/lib/openapi_client/models/id_and_message_response.rb +1 -1
  32. data/lib/openapi_client/models/identity_response.rb +1 -1
  33. data/lib/openapi_client/models/inline_response400.rb +1 -1
  34. data/lib/openapi_client/models/inline_response401.rb +1 -1
  35. data/lib/openapi_client/models/inline_response409.rb +1 -1
  36. data/lib/openapi_client/models/introspect_response.rb +1 -1
  37. data/lib/openapi_client/models/location_no_non_null_request.rb +1 -1
  38. data/lib/openapi_client/models/location_response.rb +1 -1
  39. data/lib/openapi_client/models/message_response.rb +1 -1
  40. data/lib/openapi_client/models/mode_request.rb +2 -2
  41. data/lib/openapi_client/models/mode_response.rb +2 -2
  42. data/lib/openapi_client/models/payrun_response.rb +1 -1
  43. data/lib/openapi_client/models/payslip_response.rb +1 -1
  44. data/lib/openapi_client/models/payslip_response_contributions.rb +1 -1
  45. data/lib/openapi_client/models/payslip_response_deductions.rb +1 -1
  46. data/lib/openapi_client/models/payslip_response_earnings.rb +1 -1
  47. data/lib/openapi_client/models/payslip_response_taxes.rb +1 -1
  48. data/lib/openapi_client/models/provider_request.rb +1 -1
  49. data/lib/openapi_client/models/provider_response.rb +1 -1
  50. data/lib/openapi_client/models/scopes_request.rb +12 -12
  51. data/lib/openapi_client/models/scopes_response.rb +12 -12
  52. data/lib/openapi_client/models/time_off_balance_response.rb +1 -1
  53. data/lib/openapi_client/models/time_off_entry_response.rb +1 -1
  54. data/lib/openapi_client/models/timesheet_response.rb +1 -1
  55. data/lib/openapi_client/models/token_request.rb +1 -1
  56. data/lib/openapi_client/models/token_response.rb +1 -1
  57. data/lib/openapi_client/version.rb +2 -2
  58. data/lib/openapi_client.rb +2 -2
  59. data/spec/api/class20230301_api_spec.rb +82 -82
  60. data/spec/api/core_api_spec.rb +2 -2
  61. data/spec/api/management_api_spec.rb +1 -1
  62. data/spec/api/official_api_spec.rb +1 -1
  63. data/spec/api/xhr_api_spec.rb +160 -0
  64. data/spec/api_client_spec.rb +1 -1
  65. data/spec/configuration_spec.rb +1 -1
  66. data/spec/models/address_no_non_null_request_spec.rb +1 -1
  67. data/spec/models/address_response_spec.rb +1 -1
  68. data/spec/models/client_request_spec.rb +1 -1
  69. data/spec/models/client_response_spec.rb +1 -1
  70. data/spec/models/company_response_spec.rb +1 -1
  71. data/spec/models/create_employee_request_bank_account_spec.rb +1 -1
  72. data/spec/models/create_employee_request_manager_spec.rb +1 -1
  73. data/spec/models/create_employee_request_spec.rb +1 -1
  74. data/spec/models/currency_request_spec.rb +1 -1
  75. data/spec/models/currency_response_spec.rb +1 -1
  76. data/spec/models/disconnect_response_spec.rb +1 -1
  77. data/spec/models/employee_response_spec.rb +1 -1
  78. data/spec/models/employment_no_null_enum_request_spec.rb +1 -1
  79. data/spec/models/employment_response_spec.rb +1 -1
  80. data/spec/models/group_no_null_enum_request_spec.rb +1 -1
  81. data/spec/models/group_response_spec.rb +1 -1
  82. data/spec/models/id_and_message_response_spec.rb +1 -1
  83. data/spec/models/identity_response_spec.rb +1 -1
  84. data/spec/models/inline_response400_spec.rb +1 -1
  85. data/spec/models/inline_response401_spec.rb +1 -1
  86. data/spec/models/inline_response409_spec.rb +1 -1
  87. data/spec/models/introspect_response_spec.rb +1 -1
  88. data/spec/models/location_no_non_null_request_spec.rb +1 -1
  89. data/spec/models/location_response_spec.rb +1 -1
  90. data/spec/models/message_response_spec.rb +1 -1
  91. data/spec/models/mode_request_spec.rb +1 -1
  92. data/spec/models/mode_response_spec.rb +1 -1
  93. data/spec/models/payrun_response_spec.rb +1 -1
  94. data/spec/models/payslip_response_contributions_spec.rb +1 -1
  95. data/spec/models/payslip_response_deductions_spec.rb +1 -1
  96. data/spec/models/payslip_response_earnings_spec.rb +1 -1
  97. data/spec/models/payslip_response_spec.rb +1 -1
  98. data/spec/models/payslip_response_taxes_spec.rb +1 -1
  99. data/spec/models/provider_request_spec.rb +1 -1
  100. data/spec/models/provider_response_spec.rb +1 -1
  101. data/spec/models/scopes_request_spec.rb +1 -1
  102. data/spec/models/scopes_response_spec.rb +1 -1
  103. data/spec/models/time_off_balance_response_spec.rb +1 -1
  104. data/spec/models/time_off_entry_response_spec.rb +1 -1
  105. data/spec/models/timesheet_response_spec.rb +1 -1
  106. data/spec/models/token_request_spec.rb +1 -1
  107. data/spec/models/token_response_spec.rb +1 -1
  108. data/spec/spec_helper.rb +1 -1
  109. metadata +6 -6
  110. data/spec/api/developer_api_spec.rb +0 -160
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Affix API
3
3
 
4
- #The affixapi.com API documentation. # Introduction Affix API is an OAuth 2.1 application that allows developers to access customer data, without developers needing to manage or maintain integrations; or collect login credentials or API keys from users for these third party systems. # OAuth 2.1 Affix API follows the [OAuth 2.1 spec](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-08). As an OAuth application, Affix API handles not only both the collection of sensitive user credentials or API keys, but also builds and maintains the integrations with the providers, so you don't have to. # How to obtain an access token in order to get started, you must: - register a `client_id` - direct your user to the sign in flow (`https://connect.affixapi.com` [with the appropriate query parameters](https://github.com/affixapi/starter-kit/tree/master/connect)) - capture `authorization_code` we will send to your redirect URI after the sign in flow is complete and exchange that `authorization_code` for a Bearer token # Sandbox keys (developer mode) ### dev ``` eyJhbGciOiJFUzI1NiIsImtpZCI6Ims5RmxwSFR1YklmZWNsUU5QRVZzeFcxazFZZ0Zfbk1BWllOSGVuOFQxdGciLCJ0eXAiOiJKV1MifQ.eyJwcm92aWRlciI6InNhbmRib3giLCJzY29wZXMiOlsiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL2NvbXBhbnkiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvZW1wbG95ZWUiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvZW1wbG95ZWVzIiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL2lkZW50aXR5IiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL3BheXJ1bnMiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvcGF5cnVucy86cGF5cnVuX2lkIiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL3RpbWUtb2ZmLWJhbGFuY2VzIiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL3RpbWUtb2ZmLWVudHJpZXMiLCIvMjAyMy0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ODFFLUQ5QUI0RDE0LThERjk5MjMzLTY2NjE1Q0U5In0.2zdpFAmiyYiYk6MOcbXNUwwR4M1Fextnaac340x54AidiWXCyw-u9KeavbqfYF6q8a9kcDLrxhJ8Wc_3tIzuVw' \\ 'https://api.affixapi.com/2023-03-01/developer/employees' ``` # Compression We support `brotli`, `gzip`, and `deflate` compression algorithms. To enable, pass the `Accept-Encoding` header with one or all of the values: `br`, `gzip`, `deflate`, or `identity` (no compression) In the response, you will receive the `Content-Encoding` response header indicating the compression algorithm used in the data payload to enable you to decompress the result. If the `Accept-Encoding: identity` header was passed, no `Content-Encoding` response header is sent back, as no compression algorithm was used. # Webhooks An exciting feature for HR/Payroll modes are webhooks. If enabled, your `webhook_uri` is set on your `client_id` for the respective environment: `dev | prod` Webhooks are configured to make live requests to the underlying integration 1x/hr, and if a difference is detected since the last request, we will send a request to your `webhook_uri` with this shape: ``` { added: <api.v20230301.Employees>[ <api.v20230301.Employee>{ ..., date_of_birth: '2010-08-06', display_full_name: 'Daija Rogahn', employee_number: '57993', employment_status: 'pending', employment_type: 'other', employments: [ { currency: 'eur', effective_date: '2022-02-25', employment_type: 'other', job_title: 'Dynamic Implementation Manager', pay_frequency: 'semimonthly', pay_period: 'YEAR', pay_rate: 96000, }, ], first_name: 'Daija', ... } ], removed: [], updated: [ <api.v20230301.Employee>{ ..., date_of_birth: '2009-11-09', display_full_name: 'Lourdes Stiedemann', employee_number: '63189', employment_status: 'leave', employment_type: 'full_time', employments: [ { currency: 'gbp', effective_date: '2023-01-16', employment_type: 'full_time', job_title: 'Forward Brand Planner', pay_frequency: 'semimonthly', pay_period: 'YEAR', pay_rate: 86000, }, ], first_name: 'Lourdes', } ] } ``` the following headers will be sent with webhook requests: ``` x-affix-api-signature: ab8474e609db95d5df3adc39ea3add7a7544bd215c5c520a30a650ae93a2fba7 x-affix-api-origin: webhooks-employees-webhook user-agent: affixapi.com ``` Before trusting the payload, you should sign the payload and verify the signature matches the signature sent by the `affixapi.com` service. This secures that the data sent to your `webhook_uri` is from the `affixapi.com` server. The signature is created by combining the signing secret (your `client_secret`) with the body of the request sent using a standard HMAC-SHA256 keyed hash. The signature can be created via: - create an `HMAC` with your `client_secret` - update the `HMAC` with the payload - get the hex digest -> this is the signature Sample `typescript` code that follows this recipe: ``` import { createHmac } from 'crypto'; export const computeSignature = ({ str, signingSecret, }: { signingSecret: string; str: string; }): string => { const hmac = createHmac('sha256', signingSecret); hmac.update(str); const signature = hmac.digest('hex'); return signature; }; ``` While verifying the Affix API signature header should be your primary method of confirming validity, you can also whitelist our outbound webhook static IP addresses. ``` dev: - 52.210.169.82 - 52.210.38.77 - 3.248.135.204 prod: - 52.51.160.102 - 54.220.83.244 - 3.254.213.171 ``` ## Rate limits Open endpoints (not gated by an API key) (applied at endpoint level): - 15 requests every 1 minute (by IP address) - 25 requests every 5 minutes (by IP address) Gated endpoints (require an API key) (applied at endpoint level): - 40 requests every 1 minute (by IP address) - 40 requests every 5 minutes (by `client_id`) Things to keep in mind: - Open endpoints (not gated by an API key) will likely be called by your users, not you, so rate limits generally would not apply to you. - As a developer, rate limits are applied at the endpoint granularity. - For example, say the rate limits below are 10 requests per minute by ip. from that same ip, within 1 minute, you get: - 10 requests per minute on `/orders`, - another 10 requests per minute on `/items`, - and another 10 requests per minute on `/identity`, - for a total of 30 requests per minute.
4
+ #The affixapi.com API documentation. # Introduction Affix API is an OAuth 2.1 application that allows developers to access customer data, without developers needing to manage or maintain integrations; or collect login credentials or API keys from users for these third party systems. # OAuth 2.1 Affix API follows the [OAuth 2.1 spec](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-08). As an OAuth application, Affix API handles not only both the collection of sensitive user credentials or API keys, but also builds and maintains the integrations with the providers, so you don't have to. # How to obtain an access token in order to get started, you must: - register a `client_id` - direct your user to the sign in flow (`https://connect.affixapi.com` [with the appropriate query parameters](https://github.com/affixapi/starter-kit/tree/master/connect)) - capture `authorization_code` we will send to your redirect URI after the sign in flow is complete and exchange that `authorization_code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ZXZlbG9wZXIvZW1wbG95ZWUiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvZW1wbG95ZWVzIiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL2lkZW50aXR5IiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL3BheXJ1bnMiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvcGF5cnVucy86cGF5cnVuX2lkIiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL3RpbWUtb2ZmLWJhbGFuY2VzIiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL3RpbWUtb2ZmLWVudHJpZXMiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvdGltZXNoZWV0cyJdLCJ0b2tlbiI6IjI5YjFjYTg4LWNlNjktNDgyZC1iNGZjLTkzMWMzZmJkYWM4ZSIsImlhdCI6MTcwMjkyMTA4MywiaXNzIjoicHVibGljYXBpLWludGVybWVkaWF0ZS5wcm9kLmVuZ2luZWVyaW5nLmFmZml4YXBpLmNvbSIsInN1YiI6ImRldmVsb3BlciIsImF1ZCI6IjA4QkIwODFFLUQ5QUI0RDE0LThERjk5MjMzLTY2NjE1Q0U5In0.2zdpFAmiyYiYk6MOcbXNUwwR4M1Fextnaac340x54AidiWXCyw-u9KeavbqfYF6q8a9kcDLrxhJ8Wc_3tIzuVw' \\ 'https://api.affixapi.com/2023-03-01/xhr/employees' ``` # Compression We support `brotli`, `gzip`, and `deflate` compression algorithms. To enable, pass the `Accept-Encoding` header with one or all of the values: `br`, `gzip`, `deflate`, or `identity` (no compression) In the response, you will receive the `Content-Encoding` response header indicating the compression algorithm used in the data payload to enable you to decompress the result. If the `Accept-Encoding: identity` header was passed, no `Content-Encoding` response header is sent back, as no compression algorithm was used. # Webhooks An exciting feature for HR/Payroll modes are webhooks. If enabled, your `webhook_uri` is set on your `client_id` for the respective environment: `dev | prod` Webhooks are configured to make live requests to the underlying integration 1x/hr, and if a difference is detected since the last request, we will send a request to your `webhook_uri` with this shape: ``` { added: <api.v20230301.Employees>[ <api.v20230301.Employee>{ ..., date_of_birth: '2010-08-06', display_full_name: 'Daija Rogahn', employee_number: '57993', employment_status: 'pending', employment_type: 'other', employments: [ { currency: 'eur', effective_date: '2022-02-25', employment_type: 'other', job_title: 'Dynamic Implementation Manager', pay_frequency: 'semimonthly', pay_period: 'YEAR', pay_rate: 96000, }, ], first_name: 'Daija', ... } ], removed: [], updated: [ <api.v20230301.Employee>{ ..., date_of_birth: '2009-11-09', display_full_name: 'Lourdes Stiedemann', employee_number: '63189', employment_status: 'leave', employment_type: 'full_time', employments: [ { currency: 'gbp', effective_date: '2023-01-16', employment_type: 'full_time', job_title: 'Forward Brand Planner', pay_frequency: 'semimonthly', pay_period: 'YEAR', pay_rate: 86000, }, ], first_name: 'Lourdes', } ] } ``` the following headers will be sent with webhook requests: ``` x-affix-api-signature: ab8474e609db95d5df3adc39ea3add7a7544bd215c5c520a30a650ae93a2fba7 x-affix-api-origin: webhooks-employees-webhook user-agent: affixapi.com ``` Before trusting the payload, you should sign the payload and verify the signature matches the signature sent by the `affixapi.com` service. This secures that the data sent to your `webhook_uri` is from the `affixapi.com` server. The signature is created by combining the signing secret (your `client_secret`) with the body of the request sent using a standard HMAC-SHA256 keyed hash. The signature can be created via: - create an `HMAC` with your `client_secret` - update the `HMAC` with the payload - get the hex digest -> this is the signature Sample `typescript` code that follows this recipe: ``` import { createHmac } from 'crypto'; export const computeSignature = ({ str, signingSecret, }: { signingSecret: string; str: string; }): string => { const hmac = createHmac('sha256', signingSecret); hmac.update(str); const signature = hmac.digest('hex'); return signature; }; ``` While verifying the Affix API signature header should be your primary method of confirming validity, you can also whitelist our outbound webhook static IP addresses. ``` dev: - 52.210.169.82 - 52.210.38.77 - 3.248.135.204 prod: - 52.51.160.102 - 54.220.83.244 - 3.254.213.171 ``` ## Rate limits Open endpoints (not gated by an API key) (applied at endpoint level): - 15 requests every 1 minute (by IP address) - 25 requests every 5 minutes (by IP address) Gated endpoints (require an API key) (applied at endpoint level): - 40 requests every 1 minute (by IP address) - 40 requests every 5 minutes (by `client_id`) Things to keep in mind: - Open endpoints (not gated by an API key) will likely be called by your users, not you, so rate limits generally would not apply to you. - As a developer, rate limits are applied at the endpoint granularity. - For example, say the rate limits below are 10 requests per minute by ip. from that same ip, within 1 minute, you get: - 10 requests per minute on `/orders`, - another 10 requests per minute on `/items`, - and another 10 requests per minute on `/identity`, - for a total of 30 requests per minute.
5
5
 
6
6
  The version of the OpenAPI document: 2023-03-01
7
7
  Contact: developers@affixapi.com
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.1.1
13
13
  require 'cgi'
14
14
 
15
15
  module OpenapiClient
16
- class DeveloperApi
16
+ class XHRApi
17
17
  attr_accessor :api_client
18
18
 
19
19
  def initialize(api_client = ApiClient.default)
@@ -23,8 +23,8 @@ module OpenapiClient
23
23
  # Retrieve company information
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @return [Array<CompanyResponse>]
26
- def developer_companies20230301(opts = {})
27
- data, _status_code, _headers = developer_companies20230301_with_http_info(opts)
26
+ def xhr_companies20230301(opts = {})
27
+ data, _status_code, _headers = xhr_companies20230301_with_http_info(opts)
28
28
  data
29
29
  end
30
30
 
@@ -32,12 +32,12 @@ module OpenapiClient
32
32
  # Retrieve company information
33
33
  # @param [Hash] opts the optional parameters
34
34
  # @return [Array<(Array<CompanyResponse>, Integer, Hash)>] Array<CompanyResponse> data, response status code and response headers
35
- def developer_companies20230301_with_http_info(opts = {})
35
+ def xhr_companies20230301_with_http_info(opts = {})
36
36
  if @api_client.config.debugging
37
- @api_client.config.logger.debug 'Calling API: DeveloperApi.developer_companies20230301 ...'
37
+ @api_client.config.logger.debug 'Calling API: XHRApi.xhr_companies20230301 ...'
38
38
  end
39
39
  # resource path
40
- local_var_path = '/2023-03-01/developer/company'
40
+ local_var_path = '/2023-03-01/xhr/company'
41
41
 
42
42
  # query parameters
43
43
  query_params = opts[:query_params] || {}
@@ -60,7 +60,7 @@ module OpenapiClient
60
60
  auth_names = opts[:debug_auth_names] || ['access-token']
61
61
 
62
62
  new_options = opts.merge(
63
- :operation => :"DeveloperApi.developer_companies20230301",
63
+ :operation => :"XHRApi.xhr_companies20230301",
64
64
  :header_params => header_params,
65
65
  :query_params => query_params,
66
66
  :form_params => form_params,
@@ -71,7 +71,7 @@ module OpenapiClient
71
71
 
72
72
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
73
73
  if @api_client.config.debugging
74
- @api_client.config.logger.debug "API called: DeveloperApi#developer_companies20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
+ @api_client.config.logger.debug "API called: XHRApi#xhr_companies20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
75
  end
76
76
  return data, status_code, headers
77
77
  end
@@ -81,8 +81,8 @@ module OpenapiClient
81
81
  # @param create_employee_request [CreateEmployeeRequest]
82
82
  # @param [Hash] opts the optional parameters
83
83
  # @return [EmployeeResponse]
84
- def developer_create_employee20230301(create_employee_request, opts = {})
85
- data, _status_code, _headers = developer_create_employee20230301_with_http_info(create_employee_request, opts)
84
+ def xhr_create_employee20230301(create_employee_request, opts = {})
85
+ data, _status_code, _headers = xhr_create_employee20230301_with_http_info(create_employee_request, opts)
86
86
  data
87
87
  end
88
88
 
@@ -91,16 +91,16 @@ module OpenapiClient
91
91
  # @param create_employee_request [CreateEmployeeRequest]
92
92
  # @param [Hash] opts the optional parameters
93
93
  # @return [Array<(EmployeeResponse, Integer, Hash)>] EmployeeResponse data, response status code and response headers
94
- def developer_create_employee20230301_with_http_info(create_employee_request, opts = {})
94
+ def xhr_create_employee20230301_with_http_info(create_employee_request, opts = {})
95
95
  if @api_client.config.debugging
96
- @api_client.config.logger.debug 'Calling API: DeveloperApi.developer_create_employee20230301 ...'
96
+ @api_client.config.logger.debug 'Calling API: XHRApi.xhr_create_employee20230301 ...'
97
97
  end
98
98
  # verify the required parameter 'create_employee_request' is set
99
99
  if @api_client.config.client_side_validation && create_employee_request.nil?
100
- fail ArgumentError, "Missing the required parameter 'create_employee_request' when calling DeveloperApi.developer_create_employee20230301"
100
+ fail ArgumentError, "Missing the required parameter 'create_employee_request' when calling XHRApi.xhr_create_employee20230301"
101
101
  end
102
102
  # resource path
103
- local_var_path = '/2023-03-01/developer/employee'
103
+ local_var_path = '/2023-03-01/xhr/employee'
104
104
 
105
105
  # query parameters
106
106
  query_params = opts[:query_params] || {}
@@ -125,7 +125,7 @@ module OpenapiClient
125
125
  auth_names = opts[:debug_auth_names] || ['access-token']
126
126
 
127
127
  new_options = opts.merge(
128
- :operation => :"DeveloperApi.developer_create_employee20230301",
128
+ :operation => :"XHRApi.xhr_create_employee20230301",
129
129
  :header_params => header_params,
130
130
  :query_params => query_params,
131
131
  :form_params => form_params,
@@ -136,7 +136,7 @@ module OpenapiClient
136
136
 
137
137
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
138
138
  if @api_client.config.debugging
139
- @api_client.config.logger.debug "API called: DeveloperApi#developer_create_employee20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
139
+ @api_client.config.logger.debug "API called: XHRApi#xhr_create_employee20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
140
140
  end
141
141
  return data, status_code, headers
142
142
  end
@@ -145,8 +145,8 @@ module OpenapiClient
145
145
  # List the individuals (employees, contractors, accountants, and others) listed in the HRIS/Payroll software
146
146
  # @param [Hash] opts the optional parameters
147
147
  # @return [Array<EmployeeResponse>]
148
- def developer_employees20230301(opts = {})
149
- data, _status_code, _headers = developer_employees20230301_with_http_info(opts)
148
+ def xhr_employees20230301(opts = {})
149
+ data, _status_code, _headers = xhr_employees20230301_with_http_info(opts)
150
150
  data
151
151
  end
152
152
 
@@ -154,12 +154,12 @@ module OpenapiClient
154
154
  # List the individuals (employees, contractors, accountants, and others) listed in the HRIS/Payroll software
155
155
  # @param [Hash] opts the optional parameters
156
156
  # @return [Array<(Array<EmployeeResponse>, Integer, Hash)>] Array<EmployeeResponse> data, response status code and response headers
157
- def developer_employees20230301_with_http_info(opts = {})
157
+ def xhr_employees20230301_with_http_info(opts = {})
158
158
  if @api_client.config.debugging
159
- @api_client.config.logger.debug 'Calling API: DeveloperApi.developer_employees20230301 ...'
159
+ @api_client.config.logger.debug 'Calling API: XHRApi.xhr_employees20230301 ...'
160
160
  end
161
161
  # resource path
162
- local_var_path = '/2023-03-01/developer/employees'
162
+ local_var_path = '/2023-03-01/xhr/employees'
163
163
 
164
164
  # query parameters
165
165
  query_params = opts[:query_params] || {}
@@ -182,7 +182,7 @@ module OpenapiClient
182
182
  auth_names = opts[:debug_auth_names] || ['access-token']
183
183
 
184
184
  new_options = opts.merge(
185
- :operation => :"DeveloperApi.developer_employees20230301",
185
+ :operation => :"XHRApi.xhr_employees20230301",
186
186
  :header_params => header_params,
187
187
  :query_params => query_params,
188
188
  :form_params => form_params,
@@ -193,7 +193,7 @@ module OpenapiClient
193
193
 
194
194
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
195
195
  if @api_client.config.debugging
196
- @api_client.config.logger.debug "API called: DeveloperApi#developer_employees20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
196
+ @api_client.config.logger.debug "API called: XHRApi#xhr_employees20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
197
197
  end
198
198
  return data, status_code, headers
199
199
  end
@@ -202,8 +202,8 @@ module OpenapiClient
202
202
  # The Group object is used to represent any subset of employees, such as PayGroup, Team, or Department. Employees can be in multiple Groups.
203
203
  # @param [Hash] opts the optional parameters
204
204
  # @return [Array<GroupResponse>]
205
- def developer_groups20230301(opts = {})
206
- data, _status_code, _headers = developer_groups20230301_with_http_info(opts)
205
+ def xhr_groups20230301(opts = {})
206
+ data, _status_code, _headers = xhr_groups20230301_with_http_info(opts)
207
207
  data
208
208
  end
209
209
 
@@ -211,12 +211,12 @@ module OpenapiClient
211
211
  # The Group object is used to represent any subset of employees, such as PayGroup, Team, or Department. Employees can be in multiple Groups.
212
212
  # @param [Hash] opts the optional parameters
213
213
  # @return [Array<(Array<GroupResponse>, Integer, Hash)>] Array<GroupResponse> data, response status code and response headers
214
- def developer_groups20230301_with_http_info(opts = {})
214
+ def xhr_groups20230301_with_http_info(opts = {})
215
215
  if @api_client.config.debugging
216
- @api_client.config.logger.debug 'Calling API: DeveloperApi.developer_groups20230301 ...'
216
+ @api_client.config.logger.debug 'Calling API: XHRApi.xhr_groups20230301 ...'
217
217
  end
218
218
  # resource path
219
- local_var_path = '/2023-03-01/developer/groups'
219
+ local_var_path = '/2023-03-01/xhr/groups'
220
220
 
221
221
  # query parameters
222
222
  query_params = opts[:query_params] || {}
@@ -239,7 +239,7 @@ module OpenapiClient
239
239
  auth_names = opts[:debug_auth_names] || ['access-token']
240
240
 
241
241
  new_options = opts.merge(
242
- :operation => :"DeveloperApi.developer_groups20230301",
242
+ :operation => :"XHRApi.xhr_groups20230301",
243
243
  :header_params => header_params,
244
244
  :query_params => query_params,
245
245
  :form_params => form_params,
@@ -250,7 +250,7 @@ module OpenapiClient
250
250
 
251
251
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
252
252
  if @api_client.config.debugging
253
- @api_client.config.logger.debug "API called: DeveloperApi#developer_groups20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
253
+ @api_client.config.logger.debug "API called: XHRApi#xhr_groups20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
254
254
  end
255
255
  return data, status_code, headers
256
256
  end
@@ -259,8 +259,8 @@ module OpenapiClient
259
259
  # List information of the user for the respective account
260
260
  # @param [Hash] opts the optional parameters
261
261
  # @return [IdentityResponse]
262
- def developer_identity20230301(opts = {})
263
- data, _status_code, _headers = developer_identity20230301_with_http_info(opts)
262
+ def xhr_identity20230301(opts = {})
263
+ data, _status_code, _headers = xhr_identity20230301_with_http_info(opts)
264
264
  data
265
265
  end
266
266
 
@@ -268,12 +268,12 @@ module OpenapiClient
268
268
  # List information of the user for the respective account
269
269
  # @param [Hash] opts the optional parameters
270
270
  # @return [Array<(IdentityResponse, Integer, Hash)>] IdentityResponse data, response status code and response headers
271
- def developer_identity20230301_with_http_info(opts = {})
271
+ def xhr_identity20230301_with_http_info(opts = {})
272
272
  if @api_client.config.debugging
273
- @api_client.config.logger.debug 'Calling API: DeveloperApi.developer_identity20230301 ...'
273
+ @api_client.config.logger.debug 'Calling API: XHRApi.xhr_identity20230301 ...'
274
274
  end
275
275
  # resource path
276
- local_var_path = '/2023-03-01/developer/identity'
276
+ local_var_path = '/2023-03-01/xhr/identity'
277
277
 
278
278
  # query parameters
279
279
  query_params = opts[:query_params] || {}
@@ -296,7 +296,7 @@ module OpenapiClient
296
296
  auth_names = opts[:debug_auth_names] || ['access-token']
297
297
 
298
298
  new_options = opts.merge(
299
- :operation => :"DeveloperApi.developer_identity20230301",
299
+ :operation => :"XHRApi.xhr_identity20230301",
300
300
  :header_params => header_params,
301
301
  :query_params => query_params,
302
302
  :form_params => form_params,
@@ -307,7 +307,7 @@ module OpenapiClient
307
307
 
308
308
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
309
309
  if @api_client.config.debugging
310
- @api_client.config.logger.debug "API called: DeveloperApi#developer_identity20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
310
+ @api_client.config.logger.debug "API called: XHRApi#xhr_identity20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
311
311
  end
312
312
  return data, status_code, headers
313
313
  end
@@ -318,8 +318,8 @@ module OpenapiClient
318
318
  # @param end_date [Date] The end date of the search period
319
319
  # @param [Hash] opts the optional parameters
320
320
  # @return [Array<PayrunResponse>]
321
- def developer_payruns20230301(start_date, end_date, opts = {})
322
- data, _status_code, _headers = developer_payruns20230301_with_http_info(start_date, end_date, opts)
321
+ def xhr_payruns20230301(start_date, end_date, opts = {})
322
+ data, _status_code, _headers = xhr_payruns20230301_with_http_info(start_date, end_date, opts)
323
323
  data
324
324
  end
325
325
 
@@ -329,20 +329,20 @@ module OpenapiClient
329
329
  # @param end_date [Date] The end date of the search period
330
330
  # @param [Hash] opts the optional parameters
331
331
  # @return [Array<(Array<PayrunResponse>, Integer, Hash)>] Array<PayrunResponse> data, response status code and response headers
332
- def developer_payruns20230301_with_http_info(start_date, end_date, opts = {})
332
+ def xhr_payruns20230301_with_http_info(start_date, end_date, opts = {})
333
333
  if @api_client.config.debugging
334
- @api_client.config.logger.debug 'Calling API: DeveloperApi.developer_payruns20230301 ...'
334
+ @api_client.config.logger.debug 'Calling API: XHRApi.xhr_payruns20230301 ...'
335
335
  end
336
336
  # verify the required parameter 'start_date' is set
337
337
  if @api_client.config.client_side_validation && start_date.nil?
338
- fail ArgumentError, "Missing the required parameter 'start_date' when calling DeveloperApi.developer_payruns20230301"
338
+ fail ArgumentError, "Missing the required parameter 'start_date' when calling XHRApi.xhr_payruns20230301"
339
339
  end
340
340
  # verify the required parameter 'end_date' is set
341
341
  if @api_client.config.client_side_validation && end_date.nil?
342
- fail ArgumentError, "Missing the required parameter 'end_date' when calling DeveloperApi.developer_payruns20230301"
342
+ fail ArgumentError, "Missing the required parameter 'end_date' when calling XHRApi.xhr_payruns20230301"
343
343
  end
344
344
  # resource path
345
- local_var_path = '/2023-03-01/developer/payruns'
345
+ local_var_path = '/2023-03-01/xhr/payruns'
346
346
 
347
347
  # query parameters
348
348
  query_params = opts[:query_params] || {}
@@ -367,7 +367,7 @@ module OpenapiClient
367
367
  auth_names = opts[:debug_auth_names] || ['access-token']
368
368
 
369
369
  new_options = opts.merge(
370
- :operation => :"DeveloperApi.developer_payruns20230301",
370
+ :operation => :"XHRApi.xhr_payruns20230301",
371
371
  :header_params => header_params,
372
372
  :query_params => query_params,
373
373
  :form_params => form_params,
@@ -378,7 +378,7 @@ module OpenapiClient
378
378
 
379
379
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
380
380
  if @api_client.config.debugging
381
- @api_client.config.logger.debug "API called: DeveloperApi#developer_payruns20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
381
+ @api_client.config.logger.debug "API called: XHRApi#xhr_payruns20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
382
382
  end
383
383
  return data, status_code, headers
384
384
  end
@@ -388,8 +388,8 @@ module OpenapiClient
388
388
  # @param payrun_id [String] The id of the payrun.
389
389
  # @param [Hash] opts the optional parameters
390
390
  # @return [Array<PayslipResponse>]
391
- def developer_payslips20230301(payrun_id, opts = {})
392
- data, _status_code, _headers = developer_payslips20230301_with_http_info(payrun_id, opts)
391
+ def xhr_payslips20230301(payrun_id, opts = {})
392
+ data, _status_code, _headers = xhr_payslips20230301_with_http_info(payrun_id, opts)
393
393
  data
394
394
  end
395
395
 
@@ -398,16 +398,16 @@ module OpenapiClient
398
398
  # @param payrun_id [String] The id of the payrun.
399
399
  # @param [Hash] opts the optional parameters
400
400
  # @return [Array<(Array<PayslipResponse>, Integer, Hash)>] Array<PayslipResponse> data, response status code and response headers
401
- def developer_payslips20230301_with_http_info(payrun_id, opts = {})
401
+ def xhr_payslips20230301_with_http_info(payrun_id, opts = {})
402
402
  if @api_client.config.debugging
403
- @api_client.config.logger.debug 'Calling API: DeveloperApi.developer_payslips20230301 ...'
403
+ @api_client.config.logger.debug 'Calling API: XHRApi.xhr_payslips20230301 ...'
404
404
  end
405
405
  # verify the required parameter 'payrun_id' is set
406
406
  if @api_client.config.client_side_validation && payrun_id.nil?
407
- fail ArgumentError, "Missing the required parameter 'payrun_id' when calling DeveloperApi.developer_payslips20230301"
407
+ fail ArgumentError, "Missing the required parameter 'payrun_id' when calling XHRApi.xhr_payslips20230301"
408
408
  end
409
409
  # resource path
410
- local_var_path = '/2023-03-01/developer/payruns/{payrun_id}'.sub('{' + 'payrun_id' + '}', CGI.escape(payrun_id.to_s))
410
+ local_var_path = '/2023-03-01/xhr/payruns/{payrun_id}'.sub('{' + 'payrun_id' + '}', CGI.escape(payrun_id.to_s))
411
411
 
412
412
  # query parameters
413
413
  query_params = opts[:query_params] || {}
@@ -430,7 +430,7 @@ module OpenapiClient
430
430
  auth_names = opts[:debug_auth_names] || ['access-token']
431
431
 
432
432
  new_options = opts.merge(
433
- :operation => :"DeveloperApi.developer_payslips20230301",
433
+ :operation => :"XHRApi.xhr_payslips20230301",
434
434
  :header_params => header_params,
435
435
  :query_params => query_params,
436
436
  :form_params => form_params,
@@ -441,7 +441,7 @@ module OpenapiClient
441
441
 
442
442
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
443
443
  if @api_client.config.debugging
444
- @api_client.config.logger.debug "API called: DeveloperApi#developer_payslips20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
444
+ @api_client.config.logger.debug "API called: XHRApi#xhr_payslips20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
445
445
  end
446
446
  return data, status_code, headers
447
447
  end
@@ -450,8 +450,8 @@ module OpenapiClient
450
450
  # Retrieve all time off balances.
451
451
  # @param [Hash] opts the optional parameters
452
452
  # @return [Array<TimeOffBalanceResponse>]
453
- def developer_time_off_balances20230301(opts = {})
454
- data, _status_code, _headers = developer_time_off_balances20230301_with_http_info(opts)
453
+ def xhr_time_off_balances20230301(opts = {})
454
+ data, _status_code, _headers = xhr_time_off_balances20230301_with_http_info(opts)
455
455
  data
456
456
  end
457
457
 
@@ -459,12 +459,12 @@ module OpenapiClient
459
459
  # Retrieve all time off balances.
460
460
  # @param [Hash] opts the optional parameters
461
461
  # @return [Array<(Array<TimeOffBalanceResponse>, Integer, Hash)>] Array<TimeOffBalanceResponse> data, response status code and response headers
462
- def developer_time_off_balances20230301_with_http_info(opts = {})
462
+ def xhr_time_off_balances20230301_with_http_info(opts = {})
463
463
  if @api_client.config.debugging
464
- @api_client.config.logger.debug 'Calling API: DeveloperApi.developer_time_off_balances20230301 ...'
464
+ @api_client.config.logger.debug 'Calling API: XHRApi.xhr_time_off_balances20230301 ...'
465
465
  end
466
466
  # resource path
467
- local_var_path = '/2023-03-01/developer/time-off-balances'
467
+ local_var_path = '/2023-03-01/xhr/time-off-balances'
468
468
 
469
469
  # query parameters
470
470
  query_params = opts[:query_params] || {}
@@ -487,7 +487,7 @@ module OpenapiClient
487
487
  auth_names = opts[:debug_auth_names] || ['access-token']
488
488
 
489
489
  new_options = opts.merge(
490
- :operation => :"DeveloperApi.developer_time_off_balances20230301",
490
+ :operation => :"XHRApi.xhr_time_off_balances20230301",
491
491
  :header_params => header_params,
492
492
  :query_params => query_params,
493
493
  :form_params => form_params,
@@ -498,7 +498,7 @@ module OpenapiClient
498
498
 
499
499
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
500
500
  if @api_client.config.debugging
501
- @api_client.config.logger.debug "API called: DeveloperApi#developer_time_off_balances20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
501
+ @api_client.config.logger.debug "API called: XHRApi#xhr_time_off_balances20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
502
502
  end
503
503
  return data, status_code, headers
504
504
  end
@@ -507,8 +507,8 @@ module OpenapiClient
507
507
  # Retrieve time off / absence entries
508
508
  # @param [Hash] opts the optional parameters
509
509
  # @return [Array<TimeOffEntryResponse>]
510
- def developer_time_off_entries20230301(opts = {})
511
- data, _status_code, _headers = developer_time_off_entries20230301_with_http_info(opts)
510
+ def xhr_time_off_entries20230301(opts = {})
511
+ data, _status_code, _headers = xhr_time_off_entries20230301_with_http_info(opts)
512
512
  data
513
513
  end
514
514
 
@@ -516,12 +516,12 @@ module OpenapiClient
516
516
  # Retrieve time off / absence entries
517
517
  # @param [Hash] opts the optional parameters
518
518
  # @return [Array<(Array<TimeOffEntryResponse>, Integer, Hash)>] Array<TimeOffEntryResponse> data, response status code and response headers
519
- def developer_time_off_entries20230301_with_http_info(opts = {})
519
+ def xhr_time_off_entries20230301_with_http_info(opts = {})
520
520
  if @api_client.config.debugging
521
- @api_client.config.logger.debug 'Calling API: DeveloperApi.developer_time_off_entries20230301 ...'
521
+ @api_client.config.logger.debug 'Calling API: XHRApi.xhr_time_off_entries20230301 ...'
522
522
  end
523
523
  # resource path
524
- local_var_path = '/2023-03-01/developer/time-off-entries'
524
+ local_var_path = '/2023-03-01/xhr/time-off-entries'
525
525
 
526
526
  # query parameters
527
527
  query_params = opts[:query_params] || {}
@@ -544,7 +544,7 @@ module OpenapiClient
544
544
  auth_names = opts[:debug_auth_names] || ['access-token']
545
545
 
546
546
  new_options = opts.merge(
547
- :operation => :"DeveloperApi.developer_time_off_entries20230301",
547
+ :operation => :"XHRApi.xhr_time_off_entries20230301",
548
548
  :header_params => header_params,
549
549
  :query_params => query_params,
550
550
  :form_params => form_params,
@@ -555,7 +555,7 @@ module OpenapiClient
555
555
 
556
556
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
557
557
  if @api_client.config.debugging
558
- @api_client.config.logger.debug "API called: DeveloperApi#developer_time_off_entries20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
558
+ @api_client.config.logger.debug "API called: XHRApi#xhr_time_off_entries20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
559
559
  end
560
560
  return data, status_code, headers
561
561
  end
@@ -564,8 +564,8 @@ module OpenapiClient
564
564
  # Retrieve Timesheets
565
565
  # @param [Hash] opts the optional parameters
566
566
  # @return [Array<TimesheetResponse>]
567
- def developer_timesheets20230301(opts = {})
568
- data, _status_code, _headers = developer_timesheets20230301_with_http_info(opts)
567
+ def xhr_timesheets20230301(opts = {})
568
+ data, _status_code, _headers = xhr_timesheets20230301_with_http_info(opts)
569
569
  data
570
570
  end
571
571
 
@@ -573,12 +573,12 @@ module OpenapiClient
573
573
  # Retrieve Timesheets
574
574
  # @param [Hash] opts the optional parameters
575
575
  # @return [Array<(Array<TimesheetResponse>, Integer, Hash)>] Array<TimesheetResponse> data, response status code and response headers
576
- def developer_timesheets20230301_with_http_info(opts = {})
576
+ def xhr_timesheets20230301_with_http_info(opts = {})
577
577
  if @api_client.config.debugging
578
- @api_client.config.logger.debug 'Calling API: DeveloperApi.developer_timesheets20230301 ...'
578
+ @api_client.config.logger.debug 'Calling API: XHRApi.xhr_timesheets20230301 ...'
579
579
  end
580
580
  # resource path
581
- local_var_path = '/2023-03-01/developer/timesheets'
581
+ local_var_path = '/2023-03-01/xhr/timesheets'
582
582
 
583
583
  # query parameters
584
584
  query_params = opts[:query_params] || {}
@@ -601,7 +601,7 @@ module OpenapiClient
601
601
  auth_names = opts[:debug_auth_names] || ['access-token']
602
602
 
603
603
  new_options = opts.merge(
604
- :operation => :"DeveloperApi.developer_timesheets20230301",
604
+ :operation => :"XHRApi.xhr_timesheets20230301",
605
605
  :header_params => header_params,
606
606
  :query_params => query_params,
607
607
  :form_params => form_params,
@@ -612,7 +612,7 @@ module OpenapiClient
612
612
 
613
613
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
614
614
  if @api_client.config.debugging
615
- @api_client.config.logger.debug "API called: DeveloperApi#developer_timesheets20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
615
+ @api_client.config.logger.debug "API called: XHRApi#xhr_timesheets20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
616
616
  end
617
617
  return data, status_code, headers
618
618
  end
@@ -621,8 +621,8 @@ module OpenapiClient
621
621
  # The Location object is used to represent an address that can be associated with an employee
622
622
  # @param [Hash] opts the optional parameters
623
623
  # @return [Array<LocationResponse>]
624
- def developer_work_locations20230301(opts = {})
625
- data, _status_code, _headers = developer_work_locations20230301_with_http_info(opts)
624
+ def xhr_work_locations20230301(opts = {})
625
+ data, _status_code, _headers = xhr_work_locations20230301_with_http_info(opts)
626
626
  data
627
627
  end
628
628
 
@@ -630,12 +630,12 @@ module OpenapiClient
630
630
  # The Location object is used to represent an address that can be associated with an employee
631
631
  # @param [Hash] opts the optional parameters
632
632
  # @return [Array<(Array<LocationResponse>, Integer, Hash)>] Array<LocationResponse> data, response status code and response headers
633
- def developer_work_locations20230301_with_http_info(opts = {})
633
+ def xhr_work_locations20230301_with_http_info(opts = {})
634
634
  if @api_client.config.debugging
635
- @api_client.config.logger.debug 'Calling API: DeveloperApi.developer_work_locations20230301 ...'
635
+ @api_client.config.logger.debug 'Calling API: XHRApi.xhr_work_locations20230301 ...'
636
636
  end
637
637
  # resource path
638
- local_var_path = '/2023-03-01/developer/work-locations'
638
+ local_var_path = '/2023-03-01/xhr/work-locations'
639
639
 
640
640
  # query parameters
641
641
  query_params = opts[:query_params] || {}
@@ -658,7 +658,7 @@ module OpenapiClient
658
658
  auth_names = opts[:debug_auth_names] || ['access-token']
659
659
 
660
660
  new_options = opts.merge(
661
- :operation => :"DeveloperApi.developer_work_locations20230301",
661
+ :operation => :"XHRApi.xhr_work_locations20230301",
662
662
  :header_params => header_params,
663
663
  :query_params => query_params,
664
664
  :form_params => form_params,
@@ -669,7 +669,7 @@ module OpenapiClient
669
669
 
670
670
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
671
671
  if @api_client.config.debugging
672
- @api_client.config.logger.debug "API called: DeveloperApi#developer_work_locations20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
672
+ @api_client.config.logger.debug "API called: XHRApi#xhr_work_locations20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
673
673
  end
674
674
  return data, status_code, headers
675
675
  end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Affix API
3
3
 
4
- #The affixapi.com API documentation. # Introduction Affix API is an OAuth 2.1 application that allows developers to access customer data, without developers needing to manage or maintain integrations; or collect login credentials or API keys from users for these third party systems. # OAuth 2.1 Affix API follows the [OAuth 2.1 spec](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-08). As an OAuth application, Affix API handles not only both the collection of sensitive user credentials or API keys, but also builds and maintains the integrations with the providers, so you don't have to. # How to obtain an access token in order to get started, you must: - register a `client_id` - direct your user to the sign in flow (`https://connect.affixapi.com` [with the appropriate query parameters](https://github.com/affixapi/starter-kit/tree/master/connect)) - capture `authorization_code` we will send to your redirect URI after the sign in flow is complete and exchange that `authorization_code` for a Bearer token # Sandbox keys (developer mode) ### dev ``` eyJhbGciOiJFUzI1NiIsImtpZCI6Ims5RmxwSFR1YklmZWNsUU5QRVZzeFcxazFZZ0Zfbk1BWllOSGVuOFQxdGciLCJ0eXAiOiJKV1MifQ.eyJwcm92aWRlciI6InNhbmRib3giLCJzY29wZXMiOlsiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL2NvbXBhbnkiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvZW1wbG95ZWUiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvZW1wbG95ZWVzIiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL2lkZW50aXR5IiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL3BheXJ1bnMiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvcGF5cnVucy86cGF5cnVuX2lkIiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL3RpbWUtb2ZmLWJhbGFuY2VzIiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL3RpbWUtb2ZmLWVudHJpZXMiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvdGltZXNoZWV0cyJdLCJ0b2tlbiI6ImQ1OTZhMmYzLWYzNzktNGE1ZC1hMmRhLTk4OWJmYWViYTg1ZCIsImlhdCI6MTcwMjkyMDkwMywiaXNzIjoicHVibGljYXBpLWludGVybWVkaWF0ZS5kZXYuZW5naW5lZXJpbmcuYWZmaXhhcGkuY29tIiwic3ViIjoiZGV2ZWxvcGVyIiwiYXVkIjoiM0ZEQUVERjktMURDQTRGNTQtODc5NDlGNkEtNDEwMjc2NDMifQ.VLWYjCQvBS0C3ZA6_J3-U-idZj5EYI2IlDdTjAWBx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1BWllOSGVuOFQxdGciLCJ0eXAiOiJKV1MifQ.eyJwcm92aWRlciI6InNhbmRib3giLCJzY29wZXMiOlsiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL2NvbXBhbnkiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvZW1wbG95ZWUiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvZW1wbG95ZWVzIiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL2lkZW50aXR5IiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL3BheXJ1bnMiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvcGF5cnVucy86cGF5cnVuX2lkIiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL3RpbWUtb2ZmLWJhbGFuY2VzIiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL3RpbWUtb2ZmLWVudHJpZXMiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvdGltZXNoZWV0cyJdLCJ0b2tlbiI6IjI5YjFjYTg4LWNlNjktNDgyZC1iNGZjLTkzMWMzZmJkYWM4ZSIsImlhdCI6MTcwMjkyMTA4MywiaXNzIjoicHVibGljYXBpLWludGVybWVkaWF0ZS5wcm9kLmVuZ2luZWVyaW5nLmFmZml4YXBpLmNvbSIsInN1YiI6ImRldmVsb3BlciIsImF1ZCI6IjA4QkIwODFFLUQ5QUI0RDE0LThERjk5MjMzLTY2NjE1Q0U5In0.2zdpFAmiyYiYk6MOcbXNUwwR4M1Fextnaac340x54AidiWXCyw-u9KeavbqfYF6q8a9kcDLrxhJ8Wc_3tIzuVw' \\ 'https://api.affixapi.com/2023-03-01/developer/employees' ``` # Compression We support `brotli`, `gzip`, and `deflate` compression algorithms. To enable, pass the `Accept-Encoding` header with one or all of the values: `br`, `gzip`, `deflate`, or `identity` (no compression) In the response, you will receive the `Content-Encoding` response header indicating the compression algorithm used in the data payload to enable you to decompress the result. If the `Accept-Encoding: identity` header was passed, no `Content-Encoding` response header is sent back, as no compression algorithm was used. # Webhooks An exciting feature for HR/Payroll modes are webhooks. If enabled, your `webhook_uri` is set on your `client_id` for the respective environment: `dev | prod` Webhooks are configured to make live requests to the underlying integration 1x/hr, and if a difference is detected since the last request, we will send a request to your `webhook_uri` with this shape: ``` { added: <api.v20230301.Employees>[ <api.v20230301.Employee>{ ..., date_of_birth: '2010-08-06', display_full_name: 'Daija Rogahn', employee_number: '57993', employment_status: 'pending', employment_type: 'other', employments: [ { currency: 'eur', effective_date: '2022-02-25', employment_type: 'other', job_title: 'Dynamic Implementation Manager', pay_frequency: 'semimonthly', pay_period: 'YEAR', pay_rate: 96000, }, ], first_name: 'Daija', ... } ], removed: [], updated: [ <api.v20230301.Employee>{ ..., date_of_birth: '2009-11-09', display_full_name: 'Lourdes Stiedemann', employee_number: '63189', employment_status: 'leave', employment_type: 'full_time', employments: [ { currency: 'gbp', effective_date: '2023-01-16', employment_type: 'full_time', job_title: 'Forward Brand Planner', pay_frequency: 'semimonthly', pay_period: 'YEAR', pay_rate: 86000, }, ], first_name: 'Lourdes', } ] } ``` the following headers will be sent with webhook requests: ``` x-affix-api-signature: ab8474e609db95d5df3adc39ea3add7a7544bd215c5c520a30a650ae93a2fba7 x-affix-api-origin: webhooks-employees-webhook user-agent: affixapi.com ``` Before trusting the payload, you should sign the payload and verify the signature matches the signature sent by the `affixapi.com` service. This secures that the data sent to your `webhook_uri` is from the `affixapi.com` server. The signature is created by combining the signing secret (your `client_secret`) with the body of the request sent using a standard HMAC-SHA256 keyed hash. The signature can be created via: - create an `HMAC` with your `client_secret` - update the `HMAC` with the payload - get the hex digest -> this is the signature Sample `typescript` code that follows this recipe: ``` import { createHmac } from 'crypto'; export const computeSignature = ({ str, signingSecret, }: { signingSecret: string; str: string; }): string => { const hmac = createHmac('sha256', signingSecret); hmac.update(str); const signature = hmac.digest('hex'); return signature; }; ``` While verifying the Affix API signature header should be your primary method of confirming validity, you can also whitelist our outbound webhook static IP addresses. ``` dev: - 52.210.169.82 - 52.210.38.77 - 3.248.135.204 prod: - 52.51.160.102 - 54.220.83.244 - 3.254.213.171 ``` ## Rate limits Open endpoints (not gated by an API key) (applied at endpoint level): - 15 requests every 1 minute (by IP address) - 25 requests every 5 minutes (by IP address) Gated endpoints (require an API key) (applied at endpoint level): - 40 requests every 1 minute (by IP address) - 40 requests every 5 minutes (by `client_id`) Things to keep in mind: - Open endpoints (not gated by an API key) will likely be called by your users, not you, so rate limits generally would not apply to you. - As a developer, rate limits are applied at the endpoint granularity. - For example, say the rate limits below are 10 requests per minute by ip. from that same ip, within 1 minute, you get: - 10 requests per minute on `/orders`, - another 10 requests per minute on `/items`, - and another 10 requests per minute on `/identity`, - for a total of 30 requests per minute.
4
+ #The affixapi.com API documentation. # Introduction Affix API is an OAuth 2.1 application that allows developers to access customer data, without developers needing to manage or maintain integrations; or collect login credentials or API keys from users for these third party systems. # OAuth 2.1 Affix API follows the [OAuth 2.1 spec](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-08). As an OAuth application, Affix API handles not only both the collection of sensitive user credentials or API keys, but also builds and maintains the integrations with the providers, so you don't have to. # How to obtain an access token in order to get started, you must: - register a `client_id` - direct your user to the sign in flow (`https://connect.affixapi.com` [with the appropriate query parameters](https://github.com/affixapi/starter-kit/tree/master/connect)) - capture `authorization_code` we will send to your redirect URI after the sign in flow is complete and exchange that `authorization_code` for a Bearer token # Sandbox keys (xhr mode) ### dev ``` eyJhbGciOiJFUzI1NiIsImtpZCI6Ims5RmxwSFR1YklmZWNsUU5QRVZzeFcxazFZZ0Zfbk1BWllOSGVuOFQxdGciLCJ0eXAiOiJKV1MifQ.eyJwcm92aWRlciI6InNhbmRib3giLCJzY29wZXMiOlsiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL2NvbXBhbnkiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvZW1wbG95ZWUiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvZW1wbG95ZWVzIiwiLzIwMjMtMDMtM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udHJpZXMiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvdGltZXNoZWV0cyJdLCJ0b2tlbiI6IjI5YjFjYTg4LWNlNjktNDgyZC1iNGZjLTkzMWMzZmJkYWM4ZSIsImlhdCI6MTcwMjkyMTA4MywiaXNzIjoicHVibGljYXBpLWludGVybWVkaWF0ZS5wcm9kLmVuZ2luZWVyaW5nLmFmZml4YXBpLmNvbSIsInN1YiI6ImRldmVsb3BlciIsImF1ZCI6IjA4QkIwODFFLUQ5QUI0RDE0LThERjk5MjMzLTY2NjE1Q0U5In0.2zdpFAmiyYiYk6MOcbXNUwwR4M1Fextnaac340x54AidiWXCyw-u9KeavbqfYF6q8a9kcDLrxhJ8Wc_3tIzuVw' \\ 'https://api.affixapi.com/2023-03-01/xhr/employees' ``` # Compression We support `brotli`, `gzip`, and `deflate` compression algorithms. To enable, pass the `Accept-Encoding` header with one or all of the values: `br`, `gzip`, `deflate`, or `identity` (no compression) In the response, you will receive the `Content-Encoding` response header indicating the compression algorithm used in the data payload to enable you to decompress the result. If the `Accept-Encoding: identity` header was passed, no `Content-Encoding` response header is sent back, as no compression algorithm was used. # Webhooks An exciting feature for HR/Payroll modes are webhooks. If enabled, your `webhook_uri` is set on your `client_id` for the respective environment: `dev | prod` Webhooks are configured to make live requests to the underlying integration 1x/hr, and if a difference is detected since the last request, we will send a request to your `webhook_uri` with this shape: ``` { added: <api.v20230301.Employees>[ <api.v20230301.Employee>{ ..., date_of_birth: '2010-08-06', display_full_name: 'Daija Rogahn', employee_number: '57993', employment_status: 'pending', employment_type: 'other', employments: [ { currency: 'eur', effective_date: '2022-02-25', employment_type: 'other', job_title: 'Dynamic Implementation Manager', pay_frequency: 'semimonthly', pay_period: 'YEAR', pay_rate: 96000, }, ], first_name: 'Daija', ... } ], removed: [], updated: [ <api.v20230301.Employee>{ ..., date_of_birth: '2009-11-09', display_full_name: 'Lourdes Stiedemann', employee_number: '63189', employment_status: 'leave', employment_type: 'full_time', employments: [ { currency: 'gbp', effective_date: '2023-01-16', employment_type: 'full_time', job_title: 'Forward Brand Planner', pay_frequency: 'semimonthly', pay_period: 'YEAR', pay_rate: 86000, }, ], first_name: 'Lourdes', } ] } ``` the following headers will be sent with webhook requests: ``` x-affix-api-signature: ab8474e609db95d5df3adc39ea3add7a7544bd215c5c520a30a650ae93a2fba7 x-affix-api-origin: webhooks-employees-webhook user-agent: affixapi.com ``` Before trusting the payload, you should sign the payload and verify the signature matches the signature sent by the `affixapi.com` service. This secures that the data sent to your `webhook_uri` is from the `affixapi.com` server. The signature is created by combining the signing secret (your `client_secret`) with the body of the request sent using a standard HMAC-SHA256 keyed hash. The signature can be created via: - create an `HMAC` with your `client_secret` - update the `HMAC` with the payload - get the hex digest -> this is the signature Sample `typescript` code that follows this recipe: ``` import { createHmac } from 'crypto'; export const computeSignature = ({ str, signingSecret, }: { signingSecret: string; str: string; }): string => { const hmac = createHmac('sha256', signingSecret); hmac.update(str); const signature = hmac.digest('hex'); return signature; }; ``` While verifying the Affix API signature header should be your primary method of confirming validity, you can also whitelist our outbound webhook static IP addresses. ``` dev: - 52.210.169.82 - 52.210.38.77 - 3.248.135.204 prod: - 52.51.160.102 - 54.220.83.244 - 3.254.213.171 ``` ## Rate limits Open endpoints (not gated by an API key) (applied at endpoint level): - 15 requests every 1 minute (by IP address) - 25 requests every 5 minutes (by IP address) Gated endpoints (require an API key) (applied at endpoint level): - 40 requests every 1 minute (by IP address) - 40 requests every 5 minutes (by `client_id`) Things to keep in mind: - Open endpoints (not gated by an API key) will likely be called by your users, not you, so rate limits generally would not apply to you. - As a developer, rate limits are applied at the endpoint granularity. - For example, say the rate limits below are 10 requests per minute by ip. from that same ip, within 1 minute, you get: - 10 requests per minute on `/orders`, - another 10 requests per minute on `/items`, - and another 10 requests per minute on `/identity`, - for a total of 30 requests per minute.
5
5
 
6
6
  The version of the OpenAPI document: 2023-03-01
7
7
  Contact: developers@affixapi.com