checkify 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +9 -0
- data/LICENSE +21 -0
- data/README.md +319 -0
- data/docs/AbnAddress.md +24 -0
- data/docs/AbnResponse.md +34 -0
- data/docs/AbnResponseAbnDetails.md +22 -0
- data/docs/Account.md +36 -0
- data/docs/AccountApi.md +74 -0
- data/docs/AcnAddress.md +24 -0
- data/docs/AcnResponse.md +38 -0
- data/docs/AcnResponseAbnDetails.md +18 -0
- data/docs/AcnResponseAcnDetails.md +22 -0
- data/docs/AddressApi.md +457 -0
- data/docs/AddressDetails.md +52 -0
- data/docs/AsicDocument.md +28 -0
- data/docs/AsicDocumentContentsInner.md +20 -0
- data/docs/BatchApi.md +217 -0
- data/docs/BulkCreateRequest.md +20 -0
- data/docs/BulkCreateRequestItems.md +49 -0
- data/docs/BulkJob.md +26 -0
- data/docs/BusinessActivity.md +22 -0
- data/docs/BusinessActivityResponse.md +22 -0
- data/docs/BusinessApi.md +361 -0
- data/docs/CommunicationApi.md +151 -0
- data/docs/DirectorIdResponse.md +24 -0
- data/docs/EmailResponse.md +42 -0
- data/docs/EmailResponseDns.md +18 -0
- data/docs/EmailResponseFormat.md +22 -0
- data/docs/Error.md +22 -0
- data/docs/FormerName.md +22 -0
- data/docs/IdentityApi.md +225 -0
- data/docs/NameAvailability.md +26 -0
- data/docs/PhoneResponse.md +32 -0
- data/docs/PostcodeResult.md +30 -0
- data/docs/ReverseResult.md +38 -0
- data/docs/SanctionsResponse.md +20 -0
- data/docs/SanctionsResult.md +42 -0
- data/docs/SanctionsResultSanctions.md +24 -0
- data/docs/SuburbDetails.md +30 -0
- data/docs/TfnResponse.md +24 -0
- data/lib/checkify/api/account_api.rb +79 -0
- data/lib/checkify/api/address_api.rb +490 -0
- data/lib/checkify/api/batch_api.rb +216 -0
- data/lib/checkify/api/business_api.rb +365 -0
- data/lib/checkify/api/communication_api.rb +157 -0
- data/lib/checkify/api/identity_api.rb +248 -0
- data/lib/checkify/api_client.rb +397 -0
- data/lib/checkify/api_error.rb +58 -0
- data/lib/checkify/api_model_base.rb +88 -0
- data/lib/checkify/client.rb +25 -0
- data/lib/checkify/configuration.rb +305 -0
- data/lib/checkify/models/abn_address.rb +173 -0
- data/lib/checkify/models/abn_response.rb +223 -0
- data/lib/checkify/models/abn_response_abn_details.rb +165 -0
- data/lib/checkify/models/account.rb +277 -0
- data/lib/checkify/models/acn_address.rb +173 -0
- data/lib/checkify/models/acn_response.rb +244 -0
- data/lib/checkify/models/acn_response_abn_details.rb +145 -0
- data/lib/checkify/models/acn_response_acn_details.rb +164 -0
- data/lib/checkify/models/address_details.rb +324 -0
- data/lib/checkify/models/asic_document.rb +192 -0
- data/lib/checkify/models/asic_document_contents_inner.rb +154 -0
- data/lib/checkify/models/bulk_create_request.rb +213 -0
- data/lib/checkify/models/bulk_create_request_items.rb +103 -0
- data/lib/checkify/models/bulk_job.rb +215 -0
- data/lib/checkify/models/business_activity.rb +166 -0
- data/lib/checkify/models/business_activity_response.rb +165 -0
- data/lib/checkify/models/director_id_response.rb +174 -0
- data/lib/checkify/models/email_response.rb +292 -0
- data/lib/checkify/models/email_response_dns.rb +146 -0
- data/lib/checkify/models/email_response_format.rb +167 -0
- data/lib/checkify/models/error.rb +166 -0
- data/lib/checkify/models/former_name.rb +163 -0
- data/lib/checkify/models/name_availability.rb +186 -0
- data/lib/checkify/models/phone_response.rb +216 -0
- data/lib/checkify/models/postcode_result.rb +201 -0
- data/lib/checkify/models/reverse_result.rb +237 -0
- data/lib/checkify/models/sanctions_response.rb +157 -0
- data/lib/checkify/models/sanctions_result.rb +339 -0
- data/lib/checkify/models/sanctions_result_sanctions.rb +172 -0
- data/lib/checkify/models/suburb_details.rb +207 -0
- data/lib/checkify/models/tfn_response.rb +174 -0
- data/lib/checkify/version.rb +15 -0
- data/lib/checkify.rb +78 -0
- data/openapi.yaml +1373 -0
- metadata +182 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 1fb398a2b3bac9a1ef8b2093c1fe8122611de7d42ba9d53c0b05d2e65ef13129
|
|
4
|
+
data.tar.gz: 054d9fad13402d278031a748842987984164f46f3cb52a71c76c3868cde1d624
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 6e43d7f516b7a591419dbdb834302c8a20f20842d423e659cfa9348f7271df494d0640ce863eb36c7fd1f33e40145dfc0cfbee2430539499760998bb643cb48a
|
|
7
|
+
data.tar.gz: 7559c9c422bb50c8ed3c4d7e4792b95cf1a5bd52ec5b6427147663823e064e7d219d665777c0b996473522d67cc0b25f325bd03c1059fbad62acdd136a2fedba
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 (2026-09-05)
|
|
4
|
+
|
|
5
|
+
- Initial Ruby client for Checkify's address, business, identity, communication, account, and bulk APIs.
|
|
6
|
+
- Support JSON and CSV bulk submissions.
|
|
7
|
+
- Offline VCR playback, opt-in production recording, and simulated bulk tests.
|
|
8
|
+
- Ruby 3.3 or later; packaged files exclude local credentials, recordings, and development files.
|
|
9
|
+
- Per-instance client with endpoint groups, a 30-second default timeout, and configurable redirect handling.
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ben Caldwell
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
# Checkify for Ruby
|
|
2
|
+
|
|
3
|
+
Unofficial Ruby client for the [Checkify API](https://checkify.com.au/developers) — Australian and New Zealand address validation, business lookups, identity checks, and communication validation.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Requires Ruby 3.3 or later and libcurl (normally included with macOS and Linux).
|
|
8
|
+
|
|
9
|
+
Add to your Gemfile:
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
gem "checkify", "~> 0.1.0"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Then run `bundle install`.
|
|
16
|
+
|
|
17
|
+
## Configuration
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require "checkify"
|
|
21
|
+
|
|
22
|
+
client = Checkify::Client.new(api_key: ENV.fetch("CHECKIFY_API_KEY"))
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Each client has its own credentials and configuration. Requests time out after 30
|
|
26
|
+
seconds by default; pass `timeout: 60` to change this (or `timeout: 0` to disable it).
|
|
27
|
+
For advanced configuration, pass a block:
|
|
28
|
+
|
|
29
|
+
```ruby
|
|
30
|
+
client = Checkify::Client.new(api_key: ENV.fetch("CHECKIFY_API_KEY"), timeout: 60) do |config|
|
|
31
|
+
config.debugging = false
|
|
32
|
+
end
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Two token types are available — see the [Checkify docs](https://checkify.com.au/developers) for details:
|
|
36
|
+
|
|
37
|
+
- **Public** (`ck_pub_...`) — safe for browser/mobile use, domain-restricted
|
|
38
|
+
- **Private** (`ck_prv_...`) — server-side only, higher rate limits
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
### Address autocomplete
|
|
43
|
+
|
|
44
|
+
```ruby
|
|
45
|
+
address_api = client.address
|
|
46
|
+
|
|
47
|
+
# type-ahead search (free, 0 units)
|
|
48
|
+
results = address_api.autocomplete("1 macquarie st sydney")
|
|
49
|
+
# => a hash of address IDs to highlighted labels
|
|
50
|
+
|
|
51
|
+
# full structured record (1 unit)
|
|
52
|
+
details = address_api.autocomplete_details(results.keys.first)
|
|
53
|
+
# => #<Checkify::AddressDetails street="1 MACQUARIE ST", city="SYDNEY", postcode="2000", ...>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Suburb and postcode lookup
|
|
57
|
+
|
|
58
|
+
```ruby
|
|
59
|
+
# suburb autocomplete (free)
|
|
60
|
+
suburbs = address_api.autocomplete_suburb("sydney")
|
|
61
|
+
|
|
62
|
+
# full suburb details (1 unit)
|
|
63
|
+
address_api.autocomplete_suburb_details(suburbs.keys.first)
|
|
64
|
+
|
|
65
|
+
# all suburbs for a postcode (1 unit)
|
|
66
|
+
address_api.postcode_lookup("2000")
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Reverse geocode
|
|
70
|
+
|
|
71
|
+
```ruby
|
|
72
|
+
address_api.reverse_geocode(-33.8688, 151.2130, radius: 200, limit: 3)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### ABN / ACN lookup
|
|
76
|
+
|
|
77
|
+
```ruby
|
|
78
|
+
business_api = client.business
|
|
79
|
+
|
|
80
|
+
abn = business_api.abn_lookup("26 008 672 179")
|
|
81
|
+
abn.entity_name # => "BUNNINGS GROUP LIMITED"
|
|
82
|
+
abn.abn_details.active # => true
|
|
83
|
+
|
|
84
|
+
acn = business_api.acn_lookup("008 672 179")
|
|
85
|
+
acn.addresses # => [#<Checkify::AcnAddress ...>, ...]
|
|
86
|
+
acn.documents # => [#<Checkify::AsicDocument ...>, ...]
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Business activity search
|
|
90
|
+
|
|
91
|
+
```ruby
|
|
92
|
+
business_api.business_activity("accounting", limit: 5)
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Company / business name availability
|
|
96
|
+
|
|
97
|
+
```ruby
|
|
98
|
+
business_api.company_name_check("Acme Holdings Pty Ltd")
|
|
99
|
+
business_api.business_name_check("The Coffee Collective")
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Email validation
|
|
103
|
+
|
|
104
|
+
```ruby
|
|
105
|
+
comms_api = client.communication
|
|
106
|
+
|
|
107
|
+
result = comms_api.email_validation("person@example.com")
|
|
108
|
+
result.valid # => true
|
|
109
|
+
result.score # => 0.48 (may be nil when unavailable)
|
|
110
|
+
result.free # => true
|
|
111
|
+
result.disposable # => false
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Phone validation
|
|
115
|
+
|
|
116
|
+
```ruby
|
|
117
|
+
result = comms_api.phone_validation("0412345678")
|
|
118
|
+
result.phone # => "+61412345678"
|
|
119
|
+
result.country # => "AU"
|
|
120
|
+
result.type # => "mobile"
|
|
121
|
+
result.carrier # => carrier name, when available
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Sanctions screening
|
|
125
|
+
|
|
126
|
+
```ruby
|
|
127
|
+
identity_api = client.identity
|
|
128
|
+
|
|
129
|
+
result = identity_api.sanctions_screening("Mohammad Hassan", birth_year: 1950, country: "AF")
|
|
130
|
+
result.match # => true
|
|
131
|
+
result.results.first.confidence # => 0.848
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### TFN / Director ID validation
|
|
135
|
+
|
|
136
|
+
```ruby
|
|
137
|
+
identity_api.tfn_validation("123456782")
|
|
138
|
+
identity_api.director_id_validation("036123456789010")
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Account usage
|
|
142
|
+
|
|
143
|
+
```ruby
|
|
144
|
+
account_api = client.account
|
|
145
|
+
account = account_api.get_account
|
|
146
|
+
account.units_remaining # => 48760
|
|
147
|
+
account.usage # => { "autocomplete" => 520, "abn" => 295, ... }
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Bulk processing
|
|
151
|
+
|
|
152
|
+
Bulk processing requires an eligible Checkify subscription. JSON input accepts strings for
|
|
153
|
+
single-field endpoints or objects for endpoints such as reverse geocoding:
|
|
154
|
+
|
|
155
|
+
```ruby
|
|
156
|
+
batch_api = client.batch
|
|
157
|
+
job = batch_api.create_bulk_job(
|
|
158
|
+
Checkify::BulkCreateRequest.new(endpoint: "abn", items: ["26008672179"])
|
|
159
|
+
)
|
|
160
|
+
batch_api.get_bulk_job(job.id)
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
For CSV upload, supply the endpoint and an open file as multipart form parameters:
|
|
164
|
+
|
|
165
|
+
```ruby
|
|
166
|
+
File.open("businesses.csv", "rb") do |file|
|
|
167
|
+
job = batch_api.create_bulk_job(
|
|
168
|
+
{},
|
|
169
|
+
header_params: { "Content-Type" => "multipart/form-data" },
|
|
170
|
+
form_params: { "endpoint" => "abn", "file" => file }
|
|
171
|
+
)
|
|
172
|
+
end
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Once a job completes, download its results and clean up the temporary file:
|
|
176
|
+
|
|
177
|
+
```ruby
|
|
178
|
+
require "fileutils"
|
|
179
|
+
|
|
180
|
+
file = batch_api.download_bulk_results(job.id)
|
|
181
|
+
begin
|
|
182
|
+
FileUtils.cp(file.path, "results.csv")
|
|
183
|
+
ensure
|
|
184
|
+
file.unlink
|
|
185
|
+
end
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Error handling
|
|
189
|
+
|
|
190
|
+
```ruby
|
|
191
|
+
begin
|
|
192
|
+
result = business_api.abn_lookup("invalid")
|
|
193
|
+
rescue Checkify::ApiError => e
|
|
194
|
+
e.code # => 422
|
|
195
|
+
e.response_body # => JSON containing the server error
|
|
196
|
+
e.message # => readable status, headers, and response body
|
|
197
|
+
end
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
The generated classes remain available for lower-level use. Configure their shared
|
|
201
|
+
defaults with `Checkify.configure`, or pass a `Checkify::ApiClient` constructed with
|
|
202
|
+
its own `Checkify::Configuration` to an endpoint class. `Checkify::Client` does not
|
|
203
|
+
change those shared defaults.
|
|
204
|
+
|
|
205
|
+
Redirects are followed by default. Pass `follow_location: false` to an endpoint
|
|
206
|
+
method to receive the redirect response as a `Checkify::ApiError` instead.
|
|
207
|
+
|
|
208
|
+
## API endpoints
|
|
209
|
+
|
|
210
|
+
All URIs are relative to `https://checkify.com.au/api/v1`.
|
|
211
|
+
|
|
212
|
+
| Class | Method | Endpoint | Description |
|
|
213
|
+
|---|---|---|---|
|
|
214
|
+
| `AccountApi` | `get_account` | `GET /account` | Account details and usage |
|
|
215
|
+
| `AddressApi` | `autocomplete` | `GET /autocomplete` | Address type-ahead search |
|
|
216
|
+
| `AddressApi` | `autocomplete_details` | `GET /autocomplete-details` | Full structured address |
|
|
217
|
+
| `AddressApi` | `autocomplete_suburb` | `GET /autocomplete-suburb` | Suburb type-ahead search |
|
|
218
|
+
| `AddressApi` | `autocomplete_suburb_details` | `GET /autocomplete-suburb-details` | Full suburb details |
|
|
219
|
+
| `AddressApi` | `postcode_lookup` | `GET /postcode` | Suburbs for a postcode |
|
|
220
|
+
| `AddressApi` | `reverse_geocode` | `GET /reverse` | Nearest address to coordinates |
|
|
221
|
+
| `BusinessApi` | `abn_lookup` | `GET /abn` | ABN validation and details |
|
|
222
|
+
| `BusinessApi` | `acn_lookup` | `GET /acn` | ACN validation and details |
|
|
223
|
+
| `BusinessApi` | `business_activity` | `GET /business-activity` | ANZSIC activity search |
|
|
224
|
+
| `BusinessApi` | `business_name_check` | `GET /business-name` | Business name availability |
|
|
225
|
+
| `BusinessApi` | `company_name_check` | `GET /company-name` | Company name availability |
|
|
226
|
+
| `CommunicationApi` | `email_validation` | `GET /email` | Email validation |
|
|
227
|
+
| `CommunicationApi` | `phone_validation` | `GET /phone` | Phone validation |
|
|
228
|
+
| `IdentityApi` | `sanctions_screening` | `GET /sanctions-screening` | Sanctions list screening |
|
|
229
|
+
| `IdentityApi` | `director_id_validation` | `GET /director-id` | Director ID checksum validation |
|
|
230
|
+
| `IdentityApi` | `tfn_validation` | `GET /tfn` | TFN checksum validation |
|
|
231
|
+
| `BatchApi` | `create_bulk_job` | `POST /bulk` | Submit bulk processing job |
|
|
232
|
+
| `BatchApi` | `get_bulk_job` | `GET /bulk/{id}` | Check bulk job status |
|
|
233
|
+
| `BatchApi` | `download_bulk_results` | `GET /bulk/{id}/download` | Download bulk results CSV |
|
|
234
|
+
|
|
235
|
+
## Development
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
bundle install
|
|
239
|
+
bundle exec rake
|
|
240
|
+
bundle exec rubocop
|
|
241
|
+
bundle exec rake build
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
The normal suite uses [VCR](https://github.com/vcr/vcr) to replay committed recordings
|
|
245
|
+
from `spec/fixtures/cassettes`. It does not load `.env` or contact Checkify, and fails
|
|
246
|
+
if a required recording is missing. The API recordings are genuine production
|
|
247
|
+
responses. Business fixtures use [Bunnings Group Limited (ABN 26 008 672 179)](https://abr.business.gov.au/ABN/View/26008672179).
|
|
248
|
+
Other examples use public addresses, Checkify's documented sample identifiers, and
|
|
249
|
+
`person@example.com`. Bulk tests use explicitly simulated responses because the
|
|
250
|
+
recording account does not have a bulk subscription; the multipart test verifies
|
|
251
|
+
libcurl's actual HTTP upload against a local test server.
|
|
252
|
+
|
|
253
|
+
### Recording against production
|
|
254
|
+
|
|
255
|
+
Set `CHECKIFY_API_KEY` in your environment or a local `.env` file; `.env.example`
|
|
256
|
+
shows the format. A private API key is recommended. Then explicitly enable recording:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
CHECKIFY_RECORD=1 bundle exec rspec spec/api spec/api_client_spec.rb spec/client_spec.rb
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
This records missing interactions and replays existing ones. To refresh a particular
|
|
263
|
+
recording, remove that cassette first:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
rm spec/fixtures/cassettes/business/abn_lookup.yml
|
|
267
|
+
CHECKIFY_RECORD=1 bundle exec rspec spec/api/business_api_spec.rb
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
To exercise the full recorded suite against production, remove `spec/fixtures/cassettes`
|
|
271
|
+
first and run the recording command. Review the resulting diff before committing.
|
|
272
|
+
Calls consume Checkify units and are paced below the free plan's rate limit. Bulk
|
|
273
|
+
specs remain simulated in recording mode. Public business responses are retained;
|
|
274
|
+
a recording hook removes credentials/cookies and redacts account usage and billing
|
|
275
|
+
dates. Never hand-edit recordings to make tests pass: fix the test inputs or recording
|
|
276
|
+
configuration, then record again. Old ignored files under `spec/cassettes` are unused.
|
|
277
|
+
|
|
278
|
+
### Regenerating the client
|
|
279
|
+
|
|
280
|
+
`openapi.yaml` is the locally maintained API contract, checked against
|
|
281
|
+
[Checkify's reference](https://checkify.com.au/developers). No downloadable upstream
|
|
282
|
+
OpenAPI document was available during the review on 5 September 2026.
|
|
283
|
+
|
|
284
|
+
Install OpenAPI Generator **7.21.0** and Java, then run:
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
bundle exec rake generate
|
|
288
|
+
bundle exec rake
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
`script/generate` uses `generator/config.yaml`, applies the multipart, redirect,
|
|
292
|
+
and timeout fixes to the upstream Ruby templates, regenerates the generated files
|
|
293
|
+
in `lib/` and `docs/`, and applies the project's lint rules. The handwritten
|
|
294
|
+
`lib/checkify/client.rb`, tests, gemspec, README, and CI are preserved.
|
|
295
|
+
Change the input spec or generator customization before regenerating; do not patch
|
|
296
|
+
generated library files directly. Regeneration removes obsolete generated files;
|
|
297
|
+
inspect the diff for removed or renamed schemas.
|
|
298
|
+
|
|
299
|
+
### Release checks
|
|
300
|
+
|
|
301
|
+
CI tests Ruby 3.3, 3.4, and 4.0, builds and loads the packaged gem, and scans Git history
|
|
302
|
+
for credentials. Run the suite, lint, `gem build checkify.gemspec`, and
|
|
303
|
+
`gitleaks git . --log-opts='--all' --redact` before publishing. The gem's explicit
|
|
304
|
+
file list excludes tests, recordings, credentials, and local notes.
|
|
305
|
+
|
|
306
|
+
Releases use [RubyGems Trusted Publishing](https://guides.rubygems.org/trusted-publishing/)
|
|
307
|
+
from `.github/workflows/release.yml` and the GitHub `release` environment. To release:
|
|
308
|
+
|
|
309
|
+
1. Set `gemVersion` in `generator/config.yaml`, regenerate, and update the changelog.
|
|
310
|
+
2. Commit the changes to `master` and wait for CI to pass.
|
|
311
|
+
3. Tag that commit with the matching version (for example, `v0.1.0`) and push the tag.
|
|
312
|
+
|
|
313
|
+
The release workflow reruns CI, verifies that the tag matches the gem version, and
|
|
314
|
+
publishes to RubyGems. No RubyGems API key is stored in the repository. Published
|
|
315
|
+
versions are immutable; subsequent changes need a new version and tag.
|
|
316
|
+
|
|
317
|
+
## License
|
|
318
|
+
|
|
319
|
+
This gem is available under the [MIT License](LICENSE).
|
data/docs/AbnAddress.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Checkify::AbnAddress
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **type** | **String** | Address type (e.g. serviceAddress) | [optional] |
|
|
8
|
+
| **state** | **String** | | [optional] |
|
|
9
|
+
| **postcode** | **String** | | [optional] |
|
|
10
|
+
| **active_from** | **Date** | | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'checkify'
|
|
16
|
+
|
|
17
|
+
instance = Checkify::AbnAddress.new(
|
|
18
|
+
type: null,
|
|
19
|
+
state: null,
|
|
20
|
+
postcode: null,
|
|
21
|
+
active_from: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
data/docs/AbnResponse.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Checkify::AbnResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **abn** | **String** | | [optional] |
|
|
8
|
+
| **abn_formatted** | **String** | | [optional] |
|
|
9
|
+
| **acn** | **String** | | [optional] |
|
|
10
|
+
| **acn_formatted** | **String** | | [optional] |
|
|
11
|
+
| **entity_name** | **String** | | [optional] |
|
|
12
|
+
| **entity_type** | **String** | | [optional] |
|
|
13
|
+
| **abn_details** | [**AbnResponseAbnDetails**](AbnResponseAbnDetails.md) | | [optional] |
|
|
14
|
+
| **addresses** | [**Array<AbnAddress>**](AbnAddress.md) | | [optional] |
|
|
15
|
+
| **business_names** | **Array<String>** | | [optional] |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'checkify'
|
|
21
|
+
|
|
22
|
+
instance = Checkify::AbnResponse.new(
|
|
23
|
+
abn: null,
|
|
24
|
+
abn_formatted: null,
|
|
25
|
+
acn: null,
|
|
26
|
+
acn_formatted: null,
|
|
27
|
+
entity_name: null,
|
|
28
|
+
entity_type: null,
|
|
29
|
+
abn_details: null,
|
|
30
|
+
addresses: null,
|
|
31
|
+
business_names: null
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Checkify::AbnResponseAbnDetails
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **active** | **Boolean** | | [optional] |
|
|
8
|
+
| **active_from** | **Date** | | [optional] |
|
|
9
|
+
| **gst** | **Date** | GST registration date | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'checkify'
|
|
15
|
+
|
|
16
|
+
instance = Checkify::AbnResponseAbnDetails.new(
|
|
17
|
+
active: null,
|
|
18
|
+
active_from: null,
|
|
19
|
+
gst: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
data/docs/Account.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Checkify::Account
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **plan** | **String** | | [optional] |
|
|
8
|
+
| **plan_name** | **String** | | [optional] |
|
|
9
|
+
| **status** | **String** | | [optional] |
|
|
10
|
+
| **cancels_at** | **Date** | ISO 8601 date when subscription ends (only when status is cancelling) | [optional] |
|
|
11
|
+
| **units_used** | **Integer** | | [optional] |
|
|
12
|
+
| **units_limit** | **Integer** | | [optional] |
|
|
13
|
+
| **units_remaining** | **Integer** | | [optional] |
|
|
14
|
+
| **period_start** | **Date** | | [optional] |
|
|
15
|
+
| **period_end** | **Date** | | [optional] |
|
|
16
|
+
| **usage** | **Hash<String, Integer>** | Per-endpoint call counts for the current period | [optional] |
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
require 'checkify'
|
|
22
|
+
|
|
23
|
+
instance = Checkify::Account.new(
|
|
24
|
+
plan: null,
|
|
25
|
+
plan_name: null,
|
|
26
|
+
status: null,
|
|
27
|
+
cancels_at: null,
|
|
28
|
+
units_used: null,
|
|
29
|
+
units_limit: null,
|
|
30
|
+
units_remaining: null,
|
|
31
|
+
period_start: null,
|
|
32
|
+
period_end: null,
|
|
33
|
+
usage: null
|
|
34
|
+
)
|
|
35
|
+
```
|
|
36
|
+
|
data/docs/AccountApi.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Checkify::AccountApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://checkify.com.au/api/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_account**](AccountApi.md#get_account) | **GET** /account | Get account details |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## get_account
|
|
11
|
+
|
|
12
|
+
> <Account> get_account
|
|
13
|
+
|
|
14
|
+
Get account details
|
|
15
|
+
|
|
16
|
+
Returns your current plan, unit usage, billing period, subscription status, and a per-endpoint breakdown of API calls for the current period. Costs 0 units. Usage breakdown is cached for 5 minutes.
|
|
17
|
+
|
|
18
|
+
### Examples
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
require 'time'
|
|
22
|
+
require 'checkify'
|
|
23
|
+
# setup authorization
|
|
24
|
+
Checkify.configure do |config|
|
|
25
|
+
# Configure Bearer authorization: BearerAuth
|
|
26
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
api_instance = Checkify::AccountApi.new
|
|
30
|
+
|
|
31
|
+
begin
|
|
32
|
+
# Get account details
|
|
33
|
+
result = api_instance.get_account
|
|
34
|
+
p result
|
|
35
|
+
rescue Checkify::ApiError => e
|
|
36
|
+
puts "Error when calling AccountApi->get_account: #{e}"
|
|
37
|
+
end
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
#### Using the get_account_with_http_info variant
|
|
41
|
+
|
|
42
|
+
This returns an Array which contains the response data, status code and headers.
|
|
43
|
+
|
|
44
|
+
> <Array(<Account>, Integer, Hash)> get_account_with_http_info
|
|
45
|
+
|
|
46
|
+
```ruby
|
|
47
|
+
begin
|
|
48
|
+
# Get account details
|
|
49
|
+
data, status_code, headers = api_instance.get_account_with_http_info
|
|
50
|
+
p status_code # => 2xx
|
|
51
|
+
p headers # => { ... }
|
|
52
|
+
p data # => <Account>
|
|
53
|
+
rescue Checkify::ApiError => e
|
|
54
|
+
puts "Error when calling AccountApi->get_account_with_http_info: #{e}"
|
|
55
|
+
end
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Parameters
|
|
59
|
+
|
|
60
|
+
This endpoint does not need any parameter.
|
|
61
|
+
|
|
62
|
+
### Return type
|
|
63
|
+
|
|
64
|
+
[**Account**](Account.md)
|
|
65
|
+
|
|
66
|
+
### Authorization
|
|
67
|
+
|
|
68
|
+
[BearerAuth](../README.md#BearerAuth)
|
|
69
|
+
|
|
70
|
+
### HTTP request headers
|
|
71
|
+
|
|
72
|
+
- **Content-Type**: Not defined
|
|
73
|
+
- **Accept**: application/json
|
|
74
|
+
|
data/docs/AcnAddress.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Checkify::AcnAddress
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **type** | **String** | Address type (registeredOffice, principalPlaceOfBusiness) | [optional] |
|
|
8
|
+
| **suburb** | **String** | | [optional] |
|
|
9
|
+
| **state** | **String** | | [optional] |
|
|
10
|
+
| **postcode** | **String** | | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'checkify'
|
|
16
|
+
|
|
17
|
+
instance = Checkify::AcnAddress.new(
|
|
18
|
+
type: null,
|
|
19
|
+
suburb: null,
|
|
20
|
+
state: null,
|
|
21
|
+
postcode: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
data/docs/AcnResponse.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Checkify::AcnResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **abn** | **String** | | [optional] |
|
|
8
|
+
| **abn_formatted** | **String** | | [optional] |
|
|
9
|
+
| **acn** | **String** | | [optional] |
|
|
10
|
+
| **acn_formatted** | **String** | | [optional] |
|
|
11
|
+
| **entity_name** | **String** | | [optional] |
|
|
12
|
+
| **entity_type** | **String** | | [optional] |
|
|
13
|
+
| **abn_details** | [**AcnResponseAbnDetails**](AcnResponseAbnDetails.md) | | [optional] |
|
|
14
|
+
| **acn_details** | [**AcnResponseAcnDetails**](AcnResponseAcnDetails.md) | | [optional] |
|
|
15
|
+
| **addresses** | [**Array<AcnAddress>**](AcnAddress.md) | | [optional] |
|
|
16
|
+
| **former_names** | [**Array<FormerName>**](FormerName.md) | | [optional] |
|
|
17
|
+
| **documents** | [**Array<AsicDocument>**](AsicDocument.md) | | [optional] |
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
require 'checkify'
|
|
23
|
+
|
|
24
|
+
instance = Checkify::AcnResponse.new(
|
|
25
|
+
abn: null,
|
|
26
|
+
abn_formatted: null,
|
|
27
|
+
acn: null,
|
|
28
|
+
acn_formatted: null,
|
|
29
|
+
entity_name: null,
|
|
30
|
+
entity_type: null,
|
|
31
|
+
abn_details: null,
|
|
32
|
+
acn_details: null,
|
|
33
|
+
addresses: null,
|
|
34
|
+
former_names: null,
|
|
35
|
+
documents: null
|
|
36
|
+
)
|
|
37
|
+
```
|
|
38
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Checkify::AcnResponseAbnDetails
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **active_from** | **Date** | | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'checkify'
|
|
13
|
+
|
|
14
|
+
instance = Checkify::AcnResponseAbnDetails.new(
|
|
15
|
+
active_from: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Checkify::AcnResponseAcnDetails
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **active** | **Boolean** | | [optional] |
|
|
8
|
+
| **active_from** | **Date** | | [optional] |
|
|
9
|
+
| **active_to** | **Date** | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'checkify'
|
|
15
|
+
|
|
16
|
+
instance = Checkify::AcnResponseAcnDetails.new(
|
|
17
|
+
active: null,
|
|
18
|
+
active_from: null,
|
|
19
|
+
active_to: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|