affixapi 1.1.79 → 1.1.81

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73dc9982315de6fdce9fe77523b46fa082a4f1d3005d5529157ece3da880dc4f
4
- data.tar.gz: 98a51512451adf8e8c6c8a45ba08200e16a98bc6a923c7e5b81f2dc81a0339b1
3
+ metadata.gz: 562adac4c5267c83c0e3a5f7ff673991161d6653e64cbb3691cbcc7fd7ccebb5
4
+ data.tar.gz: c669fb7bec34f51f5b0865727a41b6b6019a1513bedb6921e785c713c75d8dbe
5
5
  SHA512:
6
- metadata.gz: 031c31679d2231d75d3a77cad35411c7420467f9e56fba4a6cfd82dea9a1e465f3dfdef30622f552bc74cbdbd5c3fe728528add4a11639724e90fd3c20c3b13e
7
- data.tar.gz: 2b16d2f2cdf893cf4ce4ef62b1577e15ef353b4700997cdaed6075ad2317305b02b0ad03fe3064972c87482b59693175f5184895d7a6850045aeff6b4b9b32c9
6
+ metadata.gz: 0d78b38ff62ee431d33c98a55ed5ab1a06b87ffc57d87fb1fcbdda1795d0546f50ea5a85fd17a34e8679c007ce6f70f1ebacecb8150bc402776e25a58dc2c5e3
7
+ data.tar.gz: 807a607314d45d65fa4e93e4f139293e61ded30f315b7f0418071ffcf159f61141fcda4183d503aa3c4a7502994364a5886b5166589ea6cacfcb707b9a201295
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- affixapi (1.1.79)
4
+ affixapi (1.1.81)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -332,6 +332,7 @@ Class | Method | HTTP request | Description
332
332
  - [OpenapiClient::CreateEmployeeRequestEmergencyContacts](docs/CreateEmployeeRequestEmergencyContacts.md)
333
333
  - [OpenapiClient::CreateEmployeeRequestManager](docs/CreateEmployeeRequestManager.md)
334
334
  - [OpenapiClient::CurrencyNotNullRequest](docs/CurrencyNotNullRequest.md)
335
+ - [OpenapiClient::CurrencyNotNullResponse](docs/CurrencyNotNullResponse.md)
335
336
  - [OpenapiClient::CurrencyResponse](docs/CurrencyResponse.md)
336
337
  - [OpenapiClient::DisconnectResponse](docs/DisconnectResponse.md)
337
338
  - [OpenapiClient::EmployeeResponse](docs/EmployeeResponse.md)
@@ -355,6 +356,7 @@ Class | Method | HTTP request | Description
355
356
  - [OpenapiClient::ModeRequest](docs/ModeRequest.md)
356
357
  - [OpenapiClient::ModeResponse](docs/ModeResponse.md)
357
358
  - [OpenapiClient::PayrunResponse](docs/PayrunResponse.md)
359
+ - [OpenapiClient::PayrunTypeResponse](docs/PayrunTypeResponse.md)
358
360
  - [OpenapiClient::PayslipResponse](docs/PayslipResponse.md)
359
361
  - [OpenapiClient::PayslipResponseContributions](docs/PayslipResponseContributions.md)
360
362
  - [OpenapiClient::PayslipResponseDeductions](docs/PayslipResponseDeductions.md)
@@ -0,0 +1,15 @@
1
+ # OpenapiClient::CurrencyNotNullResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'openapi_client'
12
+
13
+ instance = OpenapiClient::CurrencyNotNullResponse.new()
14
+ ```
15
+
@@ -6,8 +6,8 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **id** | **String** | The Affix-assigned id of the individual | |
8
8
  | **remote_id** | **String** | the remote system-assigned id of the payrun | |
9
- | **run_state** | **String** | | |
10
- | **run_type** | **String** | | |
9
+ | **state** | **String** | | |
10
+ | **type** | [**PayrunTypeResponse**](PayrunTypeResponse.md) | | |
11
11
  | **start_date** | **Date** | Payrun period start date | |
12
12
  | **end_date** | **Date** | Payrun period end date | |
13
13
  | **payment_date** | **Date** | Payment date / check date | |
@@ -20,8 +20,8 @@ require 'openapi_client'
20
20
  instance = OpenapiClient::PayrunResponse.new(
21
21
  id: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw,
22
22
  remote_id: 19202938,
23
- run_state: paid,
24
- run_type: regular,
23
+ state: paid,
24
+ type: null,
25
25
  start_date: Wed Jan 01 00:00:00 UTC 2020,
26
26
  end_date: Fri Jan 31 00:00:00 UTC 2020,
27
27
  payment_date: Mon Jan 27 00:00:00 UTC 2020
@@ -0,0 +1,15 @@
1
+ # OpenapiClient::PayrunTypeResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'openapi_client'
12
+
13
+ instance = OpenapiClient::PayrunTypeResponse.new()
14
+ ```
15
+
@@ -7,8 +7,11 @@
7
7
  | **id** | **String** | The Affix-assigned id of the payslip | |
8
8
  | **remote_id** | **String** | the remote system-assigned id of the payrun | |
9
9
  | **employee_id** | **String** | | |
10
+ | **employee_remote_id** | **String** | | |
10
11
  | **payrun_id** | **String** | | |
11
- | **currency** | **String** | | |
12
+ | **payrun_remote_id** | **String** | | |
13
+ | **payrun_type** | [**PayrunTypeResponse**](PayrunTypeResponse.md) | | |
14
+ | **currency** | [**CurrencyNotNullResponse**](CurrencyNotNullResponse.md) | | |
12
15
  | **gross_pay** | **Float** | if USD/EUR/GBP, in cent | |
13
16
  | **net_pay** | **Float** | if USD/EUR/GBP, in cent | |
14
17
  | **start_date** | **Date** | | |
@@ -28,8 +31,11 @@ instance = OpenapiClient::PayslipResponse.new(
28
31
  id: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw,
29
32
  remote_id: 19202938,
30
33
  employee_id: d2f972d0-2526-434b-9409-4c3b468e08f0,
34
+ employee_remote_id: 19202938,
31
35
  payrun_id: 35347df1-95e7-46e2-93cc-66f1191edca5,
32
- currency: eur,
36
+ payrun_remote_id: 19202938,
37
+ payrun_type: null,
38
+ currency: null,
33
39
  gross_pay: 134267,
34
40
  net_pay: 86578,
35
41
  start_date: Wed Jan 01 00:00:00 UTC 2020,
@@ -0,0 +1,38 @@
1
+ =begin
2
+ #Affix API
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 (xhr mode) ### dev ``` eyJhbGciOiJFUzI1NiIsImtpZCI6Ims5RmxwSFR1YklmZWNsUU5QRVZzeFcxazFZZ0Zfbk1BWllOSGVuOFQxdGciLCJ0eXAiOiJKV1MifQ.eyJwcm92aWRlciI6InNhbmRib3giLCJzY29wZXMiOlsiLzIwMjMtMDMtMDEveGhyL2NvbXBhbnkiLCIvMjAyMy0wMy0wMS94aHIvZW1wbG95ZWUiLCIvMjAyMy0wMy0wMS94aHIvZW1wbG95ZWVzIiwiLzIwMjMtMDMtMDEveGhyL2dyb3VwcyIsIi8yMDIzLTAzLTAxL3hoci9pZGVudGl0eSIsIi8yMDIzLTAzLTAxL3hoci9wYXlydW5zIiwiLzIwMjMtMDMtMDEveGhyL3BheXJ1bnMvOnBheXJ1bl9pZCIsIi8yMDIzLTAzLTAxL3hoci90aW1lLW9mZi1iYWxhbmNlcyIsIi8yMDIzLTAzLTAxL3hoci90aW1lLW9mZi1lbnRyaWVzIiwiLzIwMjMtMDMtMDEveGhyL3RpbWVzaGVldHMiLCIvMjAyMy0wMy0wMS94aHIvd29yay1sb2NhdGlvbnMiXSwid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D6z50I3Wsk2rAd8GDWXn4vlg' \\ '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
+
6
+ The version of the OpenAPI document: 2023-03-01
7
+ Contact: developers@affixapi.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OpenapiClient
17
+ class CurrencyNotNullResponse
18
+ USD = "usd".freeze
19
+ GBP = "gbp".freeze
20
+ EUR = "eur".freeze
21
+
22
+ # Builds the enum from string
23
+ # @param [String] The enum value in the form of the string
24
+ # @return [String] The enum value
25
+ def self.build_from_hash(value)
26
+ new.build_from_hash(value)
27
+ end
28
+
29
+ # Builds the enum from string
30
+ # @param [String] The enum value in the form of the string
31
+ # @return [String] The enum value
32
+ def build_from_hash(value)
33
+ constantValues = CurrencyNotNullResponse.constants.select { |c| CurrencyNotNullResponse::const_get(c) == value }
34
+ raise "Invalid ENUM value #{value} for class #CurrencyNotNullResponse" if constantValues.empty?
35
+ value
36
+ end
37
+ end
38
+ end
@@ -21,9 +21,9 @@ module OpenapiClient
21
21
  # the remote system-assigned id of the payrun
22
22
  attr_accessor :remote_id
23
23
 
24
- attr_accessor :run_state
24
+ attr_accessor :state
25
25
 
26
- attr_accessor :run_type
26
+ attr_accessor :type
27
27
 
28
28
  # Payrun period start date
29
29
  attr_accessor :start_date
@@ -61,8 +61,8 @@ module OpenapiClient
61
61
  {
62
62
  :'id' => :'id',
63
63
  :'remote_id' => :'remote_id',
64
- :'run_state' => :'run_state',
65
- :'run_type' => :'run_type',
64
+ :'state' => :'state',
65
+ :'type' => :'type',
66
66
  :'start_date' => :'start_date',
67
67
  :'end_date' => :'end_date',
68
68
  :'payment_date' => :'payment_date'
@@ -79,8 +79,8 @@ module OpenapiClient
79
79
  {
80
80
  :'id' => :'String',
81
81
  :'remote_id' => :'String',
82
- :'run_state' => :'String',
83
- :'run_type' => :'String',
82
+ :'state' => :'String',
83
+ :'type' => :'PayrunTypeResponse',
84
84
  :'start_date' => :'Date',
85
85
  :'end_date' => :'Date',
86
86
  :'payment_date' => :'Date'
@@ -90,8 +90,8 @@ module OpenapiClient
90
90
  # List of attributes with nullable: true
91
91
  def self.openapi_nullable
92
92
  Set.new([
93
- :'run_state',
94
- :'run_type',
93
+ :'state',
94
+ :'type',
95
95
  :'start_date',
96
96
  :'end_date',
97
97
  :'payment_date'
@@ -121,12 +121,12 @@ module OpenapiClient
121
121
  self.remote_id = attributes[:'remote_id']
122
122
  end
123
123
 
124
- if attributes.key?(:'run_state')
125
- self.run_state = attributes[:'run_state']
124
+ if attributes.key?(:'state')
125
+ self.state = attributes[:'state']
126
126
  end
127
127
 
128
- if attributes.key?(:'run_type')
129
- self.run_type = attributes[:'run_type']
128
+ if attributes.key?(:'type')
129
+ self.type = attributes[:'type']
130
130
  end
131
131
 
132
132
  if attributes.key?(:'start_date')
@@ -162,31 +162,19 @@ module OpenapiClient
162
162
  def valid?
163
163
  return false if @id.nil?
164
164
  return false if @remote_id.nil?
165
- run_state_validator = EnumAttributeValidator.new('String', ["paid", "pending", "null"])
166
- return false unless run_state_validator.valid?(@run_state)
167
- run_type_validator = EnumAttributeValidator.new('String', ["regular", "one-time", "off-cycle", "correction", "reversal", "null"])
168
- return false unless run_type_validator.valid?(@run_type)
165
+ state_validator = EnumAttributeValidator.new('String', ["paid", "pending", "null"])
166
+ return false unless state_validator.valid?(@state)
169
167
  true
170
168
  end
171
169
 
172
170
  # Custom attribute writer method checking allowed values (enum).
173
- # @param [Object] run_state Object to be assigned
174
- def run_state=(run_state)
171
+ # @param [Object] state Object to be assigned
172
+ def state=(state)
175
173
  validator = EnumAttributeValidator.new('String', ["paid", "pending", "null"])
176
- unless validator.valid?(run_state)
177
- fail ArgumentError, "invalid value for \"run_state\", must be one of #{validator.allowable_values}."
174
+ unless validator.valid?(state)
175
+ fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
178
176
  end
179
- @run_state = run_state
180
- end
181
-
182
- # Custom attribute writer method checking allowed values (enum).
183
- # @param [Object] run_type Object to be assigned
184
- def run_type=(run_type)
185
- validator = EnumAttributeValidator.new('String', ["regular", "one-time", "off-cycle", "correction", "reversal", "null"])
186
- unless validator.valid?(run_type)
187
- fail ArgumentError, "invalid value for \"run_type\", must be one of #{validator.allowable_values}."
188
- end
189
- @run_type = run_type
177
+ @state = state
190
178
  end
191
179
 
192
180
  # Checks equality by comparing each attribute.
@@ -196,8 +184,8 @@ module OpenapiClient
196
184
  self.class == o.class &&
197
185
  id == o.id &&
198
186
  remote_id == o.remote_id &&
199
- run_state == o.run_state &&
200
- run_type == o.run_type &&
187
+ state == o.state &&
188
+ type == o.type &&
201
189
  start_date == o.start_date &&
202
190
  end_date == o.end_date &&
203
191
  payment_date == o.payment_date
@@ -212,7 +200,7 @@ module OpenapiClient
212
200
  # Calculates hash code according to all attributes.
213
201
  # @return [Integer] Hash code
214
202
  def hash
215
- [id, remote_id, run_state, run_type, start_date, end_date, payment_date].hash
203
+ [id, remote_id, state, type, start_date, end_date, payment_date].hash
216
204
  end
217
205
 
218
206
  # Builds the object from hash
@@ -0,0 +1,41 @@
1
+ =begin
2
+ #Affix API
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 (xhr mode) ### dev ``` eyJhbGciOiJFUzI1NiIsImtpZCI6Ims5RmxwSFR1YklmZWNsUU5QRVZzeFcxazFZZ0Zfbk1BWllOSGVuOFQxdGciLCJ0eXAiOiJKV1MifQ.eyJwcm92aWRlciI6InNhbmRib3giLCJzY29wZXMiOlsiLzIwMjMtMDMtMDEveGhyL2NvbXBhbnkiLCIvMjAyMy0wMy0wMS94aHIvZW1wbG95ZWUiLCIvMjAyMy0wMy0wMS94aHIvZW1wbG95ZWVzIiwiLzIwMjMtMDMtMDEveGhyL2dyb3VwcyIsIi8yMDIzLTAzLTAxL3hoci9pZGVudGl0eSIsIi8yMDIzLTAzLTAxL3hoci9wYXlydW5zIiwiLzIwMjMtMDMtMDEveGhyL3BheXJ1bnMvOnBheXJ1bl9pZCIsIi8yMDIzLTAzLTAxL3hoci90aW1lLW9mZi1iYWxhbmNlcyIsIi8yMDIzLTAzLTAxL3hoci90aW1lLW9mZi1lbnRyaWVzIiwiLzIwMjMtMDMtMDEveGhyL3RpbWVzaGVldHMiLCIvMjAyMy0wMy0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8NFFTHmf1r8AI8yCUYTWdfNjyZZWcZD6z50I3Wsk2rAd8GDWXn4vlg' \\ '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
+
6
+ The version of the OpenAPI document: 2023-03-01
7
+ Contact: developers@affixapi.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OpenapiClient
17
+ class PayrunTypeResponse
18
+ REGULAR = "regular".freeze
19
+ ONE_TIME = "one-time".freeze
20
+ OFF_CYCLE = "off-cycle".freeze
21
+ CORRECTION = "correction".freeze
22
+ REVERSAL = "reversal".freeze
23
+ NULL = "null".freeze
24
+
25
+ # Builds the enum from string
26
+ # @param [String] The enum value in the form of the string
27
+ # @return [String] The enum value
28
+ def self.build_from_hash(value)
29
+ new.build_from_hash(value)
30
+ end
31
+
32
+ # Builds the enum from string
33
+ # @param [String] The enum value in the form of the string
34
+ # @return [String] The enum value
35
+ def build_from_hash(value)
36
+ constantValues = PayrunTypeResponse.constants.select { |c| PayrunTypeResponse::const_get(c) == value }
37
+ raise "Invalid ENUM value #{value} for class #PayrunTypeResponse" if constantValues.empty?
38
+ value
39
+ end
40
+ end
41
+ end
@@ -23,8 +23,14 @@ module OpenapiClient
23
23
 
24
24
  attr_accessor :employee_id
25
25
 
26
+ attr_accessor :employee_remote_id
27
+
26
28
  attr_accessor :payrun_id
27
29
 
30
+ attr_accessor :payrun_remote_id
31
+
32
+ attr_accessor :payrun_type
33
+
28
34
  attr_accessor :currency
29
35
 
30
36
  # if USD/EUR/GBP, in cent
@@ -48,35 +54,16 @@ module OpenapiClient
48
54
 
49
55
  attr_accessor :taxes
50
56
 
51
- class EnumAttributeValidator
52
- attr_reader :datatype
53
- attr_reader :allowable_values
54
-
55
- def initialize(datatype, allowable_values)
56
- @allowable_values = allowable_values.map do |value|
57
- case datatype.to_s
58
- when /Integer/i
59
- value.to_i
60
- when /Float/i
61
- value.to_f
62
- else
63
- value
64
- end
65
- end
66
- end
67
-
68
- def valid?(value)
69
- !value || allowable_values.include?(value)
70
- end
71
- end
72
-
73
57
  # Attribute mapping from ruby-style variable name to JSON key.
74
58
  def self.attribute_map
75
59
  {
76
60
  :'id' => :'id',
77
61
  :'remote_id' => :'remote_id',
78
62
  :'employee_id' => :'employee_id',
63
+ :'employee_remote_id' => :'employee_remote_id',
79
64
  :'payrun_id' => :'payrun_id',
65
+ :'payrun_remote_id' => :'payrun_remote_id',
66
+ :'payrun_type' => :'payrun_type',
80
67
  :'currency' => :'currency',
81
68
  :'gross_pay' => :'gross_pay',
82
69
  :'net_pay' => :'net_pay',
@@ -101,8 +88,11 @@ module OpenapiClient
101
88
  :'id' => :'String',
102
89
  :'remote_id' => :'String',
103
90
  :'employee_id' => :'String',
91
+ :'employee_remote_id' => :'String',
104
92
  :'payrun_id' => :'String',
105
- :'currency' => :'String',
93
+ :'payrun_remote_id' => :'String',
94
+ :'payrun_type' => :'PayrunTypeResponse',
95
+ :'currency' => :'CurrencyNotNullResponse',
106
96
  :'gross_pay' => :'Float',
107
97
  :'net_pay' => :'Float',
108
98
  :'start_date' => :'Date',
@@ -118,7 +108,16 @@ module OpenapiClient
118
108
  # List of attributes with nullable: true
119
109
  def self.openapi_nullable
120
110
  Set.new([
111
+ :'id',
112
+ :'remote_id',
113
+ :'payrun_type',
114
+ :'currency',
115
+ :'gross_pay',
116
+ :'net_pay',
117
+ :'earnings',
121
118
  :'contributions',
119
+ :'deductions',
120
+ :'taxes'
122
121
  ])
123
122
  end
124
123
 
@@ -149,10 +148,22 @@ module OpenapiClient
149
148
  self.employee_id = attributes[:'employee_id']
150
149
  end
151
150
 
151
+ if attributes.key?(:'employee_remote_id')
152
+ self.employee_remote_id = attributes[:'employee_remote_id']
153
+ end
154
+
152
155
  if attributes.key?(:'payrun_id')
153
156
  self.payrun_id = attributes[:'payrun_id']
154
157
  end
155
158
 
159
+ if attributes.key?(:'payrun_remote_id')
160
+ self.payrun_remote_id = attributes[:'payrun_remote_id']
161
+ end
162
+
163
+ if attributes.key?(:'payrun_type')
164
+ self.payrun_type = attributes[:'payrun_type']
165
+ end
166
+
156
167
  if attributes.key?(:'currency')
157
168
  self.currency = attributes[:'currency']
158
169
  end
@@ -206,32 +217,20 @@ module OpenapiClient
206
217
  # @return Array for valid properties with the reasons
207
218
  def list_invalid_properties
208
219
  invalid_properties = Array.new
209
- if @id.nil?
210
- invalid_properties.push('invalid value for "id", id cannot be nil.')
211
- end
212
-
213
- if @remote_id.nil?
214
- invalid_properties.push('invalid value for "remote_id", remote_id cannot be nil.')
215
- end
216
-
217
220
  if @employee_id.nil?
218
221
  invalid_properties.push('invalid value for "employee_id", employee_id cannot be nil.')
219
222
  end
220
223
 
221
- if @payrun_id.nil?
222
- invalid_properties.push('invalid value for "payrun_id", payrun_id cannot be nil.')
224
+ if @employee_remote_id.nil?
225
+ invalid_properties.push('invalid value for "employee_remote_id", employee_remote_id cannot be nil.')
223
226
  end
224
227
 
225
- if @currency.nil?
226
- invalid_properties.push('invalid value for "currency", currency cannot be nil.')
227
- end
228
-
229
- if @gross_pay.nil?
230
- invalid_properties.push('invalid value for "gross_pay", gross_pay cannot be nil.')
228
+ if @payrun_id.nil?
229
+ invalid_properties.push('invalid value for "payrun_id", payrun_id cannot be nil.')
231
230
  end
232
231
 
233
- if @net_pay.nil?
234
- invalid_properties.push('invalid value for "net_pay", net_pay cannot be nil.')
232
+ if @payrun_remote_id.nil?
233
+ invalid_properties.push('invalid value for "payrun_remote_id", payrun_remote_id cannot be nil.')
235
234
  end
236
235
 
237
236
  if @start_date.nil?
@@ -246,52 +245,22 @@ module OpenapiClient
246
245
  invalid_properties.push('invalid value for "payment_date", payment_date cannot be nil.')
247
246
  end
248
247
 
249
- if @earnings.nil?
250
- invalid_properties.push('invalid value for "earnings", earnings cannot be nil.')
251
- end
252
-
253
- if @deductions.nil?
254
- invalid_properties.push('invalid value for "deductions", deductions cannot be nil.')
255
- end
256
-
257
- if @taxes.nil?
258
- invalid_properties.push('invalid value for "taxes", taxes cannot be nil.')
259
- end
260
-
261
248
  invalid_properties
262
249
  end
263
250
 
264
251
  # Check to see if the all the properties in the model are valid
265
252
  # @return true if the model is valid
266
253
  def valid?
267
- return false if @id.nil?
268
- return false if @remote_id.nil?
269
254
  return false if @employee_id.nil?
255
+ return false if @employee_remote_id.nil?
270
256
  return false if @payrun_id.nil?
271
- return false if @currency.nil?
272
- currency_validator = EnumAttributeValidator.new('String', ["usd", "eur", "gbp"])
273
- return false unless currency_validator.valid?(@currency)
274
- return false if @gross_pay.nil?
275
- return false if @net_pay.nil?
257
+ return false if @payrun_remote_id.nil?
276
258
  return false if @start_date.nil?
277
259
  return false if @end_date.nil?
278
260
  return false if @payment_date.nil?
279
- return false if @earnings.nil?
280
- return false if @deductions.nil?
281
- return false if @taxes.nil?
282
261
  true
283
262
  end
284
263
 
285
- # Custom attribute writer method checking allowed values (enum).
286
- # @param [Object] currency Object to be assigned
287
- def currency=(currency)
288
- validator = EnumAttributeValidator.new('String', ["usd", "eur", "gbp"])
289
- unless validator.valid?(currency)
290
- fail ArgumentError, "invalid value for \"currency\", must be one of #{validator.allowable_values}."
291
- end
292
- @currency = currency
293
- end
294
-
295
264
  # Checks equality by comparing each attribute.
296
265
  # @param [Object] Object to be compared
297
266
  def ==(o)
@@ -300,7 +269,10 @@ module OpenapiClient
300
269
  id == o.id &&
301
270
  remote_id == o.remote_id &&
302
271
  employee_id == o.employee_id &&
272
+ employee_remote_id == o.employee_remote_id &&
303
273
  payrun_id == o.payrun_id &&
274
+ payrun_remote_id == o.payrun_remote_id &&
275
+ payrun_type == o.payrun_type &&
304
276
  currency == o.currency &&
305
277
  gross_pay == o.gross_pay &&
306
278
  net_pay == o.net_pay &&
@@ -322,7 +294,7 @@ module OpenapiClient
322
294
  # Calculates hash code according to all attributes.
323
295
  # @return [Integer] Hash code
324
296
  def hash
325
- [id, remote_id, employee_id, payrun_id, currency, gross_pay, net_pay, start_date, end_date, payment_date, earnings, contributions, deductions, taxes].hash
297
+ [id, remote_id, employee_id, employee_remote_id, payrun_id, payrun_remote_id, payrun_type, currency, gross_pay, net_pay, start_date, end_date, payment_date, earnings, contributions, deductions, taxes].hash
326
298
  end
327
299
 
328
300
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.1.1
11
11
  =end
12
12
 
13
13
  module OpenapiClient
14
- VERSION = '1.1.79'
14
+ VERSION = '1.1.81'
15
15
  end
@@ -30,6 +30,7 @@ require 'openapi_client/models/create_employee_request_dependents'
30
30
  require 'openapi_client/models/create_employee_request_emergency_contacts'
31
31
  require 'openapi_client/models/create_employee_request_manager'
32
32
  require 'openapi_client/models/currency_not_null_request'
33
+ require 'openapi_client/models/currency_not_null_response'
33
34
  require 'openapi_client/models/currency_response'
34
35
  require 'openapi_client/models/disconnect_response'
35
36
  require 'openapi_client/models/employee_response'
@@ -53,6 +54,7 @@ require 'openapi_client/models/message_response'
53
54
  require 'openapi_client/models/mode_request'
54
55
  require 'openapi_client/models/mode_response'
55
56
  require 'openapi_client/models/payrun_response'
57
+ require 'openapi_client/models/payrun_type_response'
56
58
  require 'openapi_client/models/payslip_response'
57
59
  require 'openapi_client/models/payslip_response_contributions'
58
60
  require 'openapi_client/models/payslip_response_deductions'
@@ -0,0 +1,28 @@
1
+ =begin
2
+ #Affix API
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 (xhr mode) ### dev ``` eyJhbGciOiJFUzI1NiIsImtpZCI6Ims5RmxwSFR1YklmZWNsUU5QRVZzeFcxazFZZ0Zfbk1BWllOSGVuOFQxdGciLCJ0eXAiOiJKV1MifQ.eyJwcm92aWRlciI6InNhbmRib3giLCJzY29wZXMiOlsiLzIwMjMtMDMtMDEveGhyL2NvbXBhbnkiLCIvMjAyMy0wMy0wMS94aHIvZW1wbG95ZWUiLCIvMjAyMy0wMy0wMS94aHIvZW1wbG95ZWVzIiwiLzIwMjMtMDMtMDEveGhyL2dyb3VwcyIsIi8yMDIzLTAzLTAxL3hoci9pZGVudGl0eSIsIi8yMDIzLTAzLTAxL3hoci9wYXlydW5zIiwiLzIwMjMtMDMtMDEveGhyL3BheXJ1bnMvOnBheXJ1bl9pZCIsIi8yMDIzLTAzLTAxL3hoci90aW1lLW9mZi1iYWxhbmNlcyIsIi8yMDIzLTAzLT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iOiIwOEJCMDgxRS1EOUFCNEQxNC04REY5OTIzMy02NjYxNUNFOSJ9.n3pJmmfegU21Tko_TyUyCHi4ITvfd75T8NFFTHmf1r8AI8yCUYTWdfNjyZZWcZD6z50I3Wsk2rAd8GDWXn4vlg' \\ '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
+
6
+ The version of the OpenAPI document: 2023-03-01
7
+ Contact: developers@affixapi.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for OpenapiClient::CurrencyNotNullResponse
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe OpenapiClient::CurrencyNotNullResponse do
21
+ let(:instance) { OpenapiClient::CurrencyNotNullResponse.new }
22
+
23
+ describe 'test an instance of CurrencyNotNullResponse' do
24
+ it 'should create an instance of CurrencyNotNullResponse' do
25
+ expect(instance).to be_instance_of(OpenapiClient::CurrencyNotNullResponse)
26
+ end
27
+ end
28
+ end
@@ -37,23 +37,19 @@ describe OpenapiClient::PayrunResponse do
37
37
  end
38
38
  end
39
39
 
40
- describe 'test attribute "run_state"' do
40
+ describe 'test attribute "state"' do
41
41
  it 'should work' do
42
42
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
43
  # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["paid", "pending", "null"])
44
44
  # validator.allowable_values.each do |value|
45
- # expect { instance.run_state = value }.not_to raise_error
45
+ # expect { instance.state = value }.not_to raise_error
46
46
  # end
47
47
  end
48
48
  end
49
49
 
50
- describe 'test attribute "run_type"' do
50
+ describe 'test attribute "type"' do
51
51
  it 'should work' do
52
52
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
53
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["regular", "one-time", "off-cycle", "correction", "reversal", "null"])
54
- # validator.allowable_values.each do |value|
55
- # expect { instance.run_type = value }.not_to raise_error
56
- # end
57
53
  end
58
54
  end
59
55
 
@@ -0,0 +1,28 @@
1
+ =begin
2
+ #Affix API
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 (xhr mode) ### dev ``` eyJhbGciO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GVudGl0eSIsIi8yMDIzLTAzLTAxL3hoci9wYXlydW5zIiwiLzIwMjMtMDMtMDEveGhyL3BheXJ1bnMvOnBheXJ1bl9pZCIsIi8yMDIzLTAzLTAxL3hoci90aW1lLW9mZi1iYWxhbmNlcyIsIi8yMDIzLTAzLTAxL3hoci90aW1lLW9mZi1lbnRyaWVzIiwiLzIwMjMtMDMtMDEveGhyL3RpbWVzaGVldHMiLCIvMjAyMy0wMy0wMS94aHIvd29yay1sb2NhdGlvbnMiXSwidG9rZW4iOiIzYjg4MDc2NC1kMGFmLTQ5ZDAtOGM5OS00YzIwYjE2MTJjOTMiLCJpYXQiOjE3MTE4MTA4NTgsImlzcyI6InB1YmxpY2FwaS1pbnRlcm1lZGlhdGUucHJvZC5lbmdpbmVlcmluZy5hZmZpeGFwaS5jb20iLCJzdWIiOiJ4aHIiLCJhdWQiOiIwOEJCMDgxRS1EOUFCNEQxNC04REY5OTIzMy02NjYxNUNFOSJ9.n3pJmmfegU21Tko_TyUyCHi4ITvfd75T8NFFTHmf1r8AI8yCUYTWdfNjyZZWcZD6z50I3Wsk2rAd8GDWXn4vlg' \\ '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
+
6
+ The version of the OpenAPI document: 2023-03-01
7
+ Contact: developers@affixapi.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for OpenapiClient::PayrunTypeResponse
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe OpenapiClient::PayrunTypeResponse do
21
+ let(:instance) { OpenapiClient::PayrunTypeResponse.new }
22
+
23
+ describe 'test an instance of PayrunTypeResponse' do
24
+ it 'should create an instance of PayrunTypeResponse' do
25
+ expect(instance).to be_instance_of(OpenapiClient::PayrunTypeResponse)
26
+ end
27
+ end
28
+ end
@@ -43,19 +43,33 @@ describe OpenapiClient::PayslipResponse do
43
43
  end
44
44
  end
45
45
 
46
+ describe 'test attribute "employee_remote_id"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
46
52
  describe 'test attribute "payrun_id"' do
47
53
  it 'should work' do
48
54
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
55
  end
50
56
  end
51
57
 
58
+ describe 'test attribute "payrun_remote_id"' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
61
+ end
62
+ end
63
+
64
+ describe 'test attribute "payrun_type"' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
67
+ end
68
+ end
69
+
52
70
  describe 'test attribute "currency"' do
53
71
  it 'should work' do
54
72
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
55
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["usd", "eur", "gbp"])
56
- # validator.allowable_values.each do |value|
57
- # expect { instance.currency = value }.not_to raise_error
58
- # end
59
73
  end
60
74
  end
61
75
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: affixapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.79
4
+ version: 1.1.81
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-26 00:00:00.000000000 Z
11
+ date: 2024-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -137,6 +137,7 @@ files:
137
137
  - docs/CreateEmployeeRequestEmergencyContacts.md
138
138
  - docs/CreateEmployeeRequestManager.md
139
139
  - docs/CurrencyNotNullRequest.md
140
+ - docs/CurrencyNotNullResponse.md
140
141
  - docs/CurrencyResponse.md
141
142
  - docs/DisconnectResponse.md
142
143
  - docs/EmployeeResponse.md
@@ -161,6 +162,7 @@ files:
161
162
  - docs/ModeRequest.md
162
163
  - docs/ModeResponse.md
163
164
  - docs/PayrunResponse.md
165
+ - docs/PayrunTypeResponse.md
164
166
  - docs/PayslipResponse.md
165
167
  - docs/PayslipResponseContributions.md
166
168
  - docs/PayslipResponseDeductions.md
@@ -199,6 +201,7 @@ files:
199
201
  - lib/openapi_client/models/create_employee_request_emergency_contacts.rb
200
202
  - lib/openapi_client/models/create_employee_request_manager.rb
201
203
  - lib/openapi_client/models/currency_not_null_request.rb
204
+ - lib/openapi_client/models/currency_not_null_response.rb
202
205
  - lib/openapi_client/models/currency_response.rb
203
206
  - lib/openapi_client/models/disconnect_response.rb
204
207
  - lib/openapi_client/models/employee_response.rb
@@ -222,6 +225,7 @@ files:
222
225
  - lib/openapi_client/models/mode_request.rb
223
226
  - lib/openapi_client/models/mode_response.rb
224
227
  - lib/openapi_client/models/payrun_response.rb
228
+ - lib/openapi_client/models/payrun_type_response.rb
225
229
  - lib/openapi_client/models/payslip_response.rb
226
230
  - lib/openapi_client/models/payslip_response_contributions.rb
227
231
  - lib/openapi_client/models/payslip_response_deductions.rb
@@ -257,6 +261,7 @@ files:
257
261
  - spec/models/create_employee_request_manager_spec.rb
258
262
  - spec/models/create_employee_request_spec.rb
259
263
  - spec/models/currency_not_null_request_spec.rb
264
+ - spec/models/currency_not_null_response_spec.rb
260
265
  - spec/models/currency_response_spec.rb
261
266
  - spec/models/disconnect_response_spec.rb
262
267
  - spec/models/employee_response_manager_spec.rb
@@ -280,6 +285,7 @@ files:
280
285
  - spec/models/mode_request_spec.rb
281
286
  - spec/models/mode_response_spec.rb
282
287
  - spec/models/payrun_response_spec.rb
288
+ - spec/models/payrun_type_response_spec.rb
283
289
  - spec/models/payslip_response_contributions_spec.rb
284
290
  - spec/models/payslip_response_deductions_spec.rb
285
291
  - spec/models/payslip_response_earnings_spec.rb
@@ -2786,6 +2792,7 @@ test_files:
2786
2792
  - spec/configuration_spec.rb
2787
2793
  - spec/models/inline_response401_spec.rb
2788
2794
  - spec/models/address_no_non_null_request_spec.rb
2795
+ - spec/models/payrun_type_response_spec.rb
2789
2796
  - spec/models/create_employee_request_manager_spec.rb
2790
2797
  - spec/models/inline_response400_spec.rb
2791
2798
  - spec/models/location_response_spec.rb
@@ -2815,6 +2822,7 @@ test_files:
2815
2822
  - spec/models/timesheet_response_spec.rb
2816
2823
  - spec/models/company_response_spec.rb
2817
2824
  - spec/models/scopes_request_spec.rb
2825
+ - spec/models/currency_not_null_response_spec.rb
2818
2826
  - spec/models/payslip_response_spec.rb
2819
2827
  - spec/models/mode_response_spec.rb
2820
2828
  - spec/models/provider_response_spec.rb