parseapi 1.10.0 → 1.10.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 668ab627de5bf1a6b476e54841045fe6e3110d1ccd91e861380ea21d5103be40
4
- data.tar.gz: a9cf7d1cc8d1b28baa3a62f29355deff8cda22eb1ee27a95b328f78dc2efe646
3
+ metadata.gz: 80dac1fcdd566a5fc6727f941052b2ad35e05760826ad0100ebe2005ea0ced28
4
+ data.tar.gz: 2b6dcaac8d08ab828eee5aa196f4d5f4fdb9451bb6a4dab10112ad6415ab0f16
5
5
  SHA512:
6
- metadata.gz: 58883fd322a90aba10e64f12299b785313105d589f02cb627b5c41cb3870b8feedc80c9efefb061b8dc7779cbc34d4c941813ff49ad0e135f58ef10a5842dd5e
7
- data.tar.gz: 81b76b6ffd9b1e35f320f59a553564671f74fb0275364503b77bce581ac8b07651e91a9d30fc4f0d22a9cfc4181d48616585dbee6597d6d0a6978c79973270f5
6
+ metadata.gz: 704c8c350a83c97df89e355d79491206d9b9c184f7d25b446bdac25c6587f83c5e60cf27134162c4591a8685bc9b73d8376125f2abf416b9311832f7a6f9ccc3
7
+ data.tar.gz: 3afc44b68d977c8c09bec265d2a57d37de68aabf22cb6e2798a78e85119e140ed4de46583f55715e08593efc07c6a5c2766a4c1b9e268562681b29dae0faaf21
data/README.md CHANGED
@@ -42,7 +42,7 @@ Pass `country` when a postal code or national phone number needs disambiguation.
42
42
 
43
43
  Results are plain data. Pass a returned code or coordinate to another operation when the task needs it. Check nullable values before composing the next call.
44
44
 
45
- Use `parse.postal('28202', country: 'US', deep: true)` for US ZIP tax references. `deep.tax` names the levy and `deep.tax_rate` is a percentage, so `7.9` means 7.9%. The state, county, city and special components explain that combined rate. An exact address can differ. Country and state lookups provide their own geographic reference rates, which should not be added to the ZIP rate. `nil` means unknown and `0` means known zero. Country `deep.tax_id_format` and `deep.tax_id_regex` describe registration-number format only. Use `vat` for a metered registration check with `deep` explicitly enabled.
45
+ Use `parse.postal('28202', country: 'US', deep: true)` for US ZIP tax references. `deep.tax` names the levy and `deep.tax_rate` is a percentage, so `7.9` means 7.9%. The state, county, city and special components explain that combined rate. An exact address can differ. Country and state lookups provide their own geographic reference rates, which should not be added to the ZIP rate. `nil` means unknown and `0` means known zero. Country `deep.tax_id_format` and `deep.tax_id_regex` describe registration-number format only. Use for a metered registration check with `deep` explicitly enabled.
46
46
 
47
47
  ## Company directory
48
48
 
@@ -81,10 +81,8 @@ One method per endpoint, named after the route.
81
81
  parse.ip('8.8.8.8')
82
82
  parse.ip_self
83
83
  parse.email('hello@gmail.com')
84
- parse.vat('DE136695976')
85
84
  parse.bank('DE89370400440532013000')
86
85
  parse.card('424242')
87
- parse.provider('1881018208')
88
86
  parse.phone('+14155552671')
89
87
  parse.carrier('+14155552671')
90
88
  parse.caller('+14155552671')
@@ -114,8 +112,6 @@ parse.state_districts('NC', country: 'US')
114
112
  parse.district('37081')
115
113
  parse.continent('NA')
116
114
  parse.continent_countries('NA')
117
- parse.bloc('EU')
118
- parse.bloc_countries('SCHENGEN')
119
115
  parse.currency('USD')
120
116
  parse.currency_rate('USD', 'EUR')
121
117
  parse.language('en')
@@ -141,11 +137,8 @@ parse.mx('example.com')
141
137
  parse.dns('example.com')
142
138
  parse.dns('_dmarc.example.com', type: 'TXT')
143
139
  parse.useragent(ua_string)
144
- parse.vehicle('1HGCM82633A004352')
145
140
  parse.industry('541511')
146
141
  parse.industry_search('coffee shop', limit: 5)
147
- parse.tariff('8471.30.01.00', origin: 'CN', deep: true)
148
- parse.tariff_search('sunglasses')
149
142
  parse.emoji('rocket')
150
143
  parse.emoji_search('fire')
151
144
  ```
@@ -168,7 +161,7 @@ Choose display names for one request:
168
161
  parse.country('DE', lang: 'fr')
169
162
  ```
170
163
 
171
- `lang` is optional on geography lookups and their lists/searches, Currency lookup, Language, Date, Time/Timezone, Emoji lookup/search, and unit discovery. IP, ASN, national Company number lookup and NPI also accept it for their geographic labels. Codes, native names, quantities and response structure retain their meanings. Source coverage determines which labels are translated; unavailable labels use the API's documented fallback.
164
+ `lang` is optional on geography lookups and their lists/searches, Currency lookup, Language, Date, Time/Timezone, Emoji lookup/search, and unit discovery. IP, ASN and national Company number lookups also accept it for their geographic labels. Codes, native names, quantities and response structure retain their meanings. Source coverage determines which labels are translated; unavailable labels use the API's documented fallback.
172
165
 
173
166
  The next call keeps its usual default unless it also supplies `lang`. Existing `deep` rules still apply. Date `format` and measurement `locale` remain explicit input-parsing controls.
174
167
 
@@ -255,19 +248,6 @@ Weather returns current conditions by default. Paid deep adds specialist current
255
248
  parse.weather(40.7128, -74.006, deep: true, date: '2026-08-15')
256
249
  ```
257
250
 
258
- Tariff starts with the general schedule line. Paid deep adds units and the special and other schedule columns. An optional origin then resolves country-specific measures. The three calls below show those successive choices. Without origin, schedule detail is still returned and origin-dependent fields are null. A null effective rate is not a zero rate.
259
-
260
- Tariff lookup and search accept the `edition` ID returned by Tariff, such as `ted_3`, and an optional `date` (`YYYY-MM-DD`). The edition pins exact immutable source bytes. A date is accepted only when verified source coverage exists. An edition without a date returns undated schedule context (`date: null`). Default requests use today. Paid detail exposes an open-string `reason` when `effective_rate` is null, including `incomplete_coverage`. A null rate never means zero. Explicit selections fail with `tariff_selection_mismatch` if an older server ignores the requested scope.
261
-
262
- Origin means where the goods originate, not where they ship from. The effective rate covers matched stored schedule measures only. It is not complete duty or landed cost.
263
-
264
- Codes contain 4, 6, 8 or 10 ASCII digits; dots and whitespace are optional. Search returns up to 20 description matches with parent `lineage` so a result named "Other" has context. Search is not product classification. In deep, `measures: null` means origin-dependent measures were not resolved. `measures: []` means the resolved lookup found none.
265
-
266
- ```ruby
267
- parse.tariff('8471.30.01.00')
268
- parse.tariff('8471.30.01.00', deep: true)
269
- parse.tariff('8471.30.01.00', deep: true, origin: 'CN')
270
- ```
271
251
 
272
252
  Address search uses context from the form: prefer postal, or city and state. An optional end-user `ip` is a locality hint for server-side calls. An empty result explains itself with `reason`: `more_input`, `missing_context` or `no_matches`. With suggestions, reason is null. Older responses may omit it, and future reasons remain strings. Catalog and lookup failures use the existing API errors.
273
253
 
@@ -284,21 +264,6 @@ parse.bank_requirements('US', format: 'us_ach')
284
264
  parse.bank_us_ach(routing: '011000015', account: '0001234567')
285
265
  ```
286
266
 
287
- ## Provider lookup
288
-
289
- ```ruby
290
- provider = parse.provider('1881018208')
291
- profile = parse.provider('1881018208', deep: true)
292
- ```
293
-
294
- Pass the original NPI as a string. `valid` checks its format and checksum; `registered` means a match in the stored NPPES snapshot. `active` reflects recorded NPI deactivation, not licensure. `excluded` is an NPI-only OIG LEIE match; `false` is not a complete exclusion clearance. These directory facts do not verify credentials, current practice contact or payment eligibility.
295
-
296
- Invalid input returns `valid: false` with unknown provider fields. A checksum-valid number missing from the snapshot returns `registered: false`; unavailable storage remains an API error. Preserve `null` as unknown.
297
-
298
- The default pooled lookup includes provider identity, specialty and practice contact where held. Paid `deep` adds `deactivated_at`, `medicare`, `opt_out` and `enrollments` from stored source files, with no separate check meter or live verification. `enrollments: null` means unavailable; `[]` means no enrollment rows are returned. The API omits unrequested `deep` and returns `{}` when requested on Free.
299
-
300
- Paid Deep also returns `taxonomies` in published order, with taxonomy code, specialty label, primary flag and provider-reported license number/state, plus `enumerated_at`, `updated_at` and `reactivated_at` record dates. Reported licenses are not verified licenses. Null lists mean unavailable; empty lists mean the edition contains no entries. Provider record dates describe the provider record. Unknown dates stay null.
301
-
302
267
  ## Deep
303
268
 
304
269
  Choose enrichment for the question you need answered.
@@ -308,12 +273,10 @@ Choose enrichment for the question you need answered.
308
273
  | IP | Richer IP fields included with a paid plan. No separate check meter. |
309
274
  | Domain | Registration dates, registrar, status and DNSSEC, included with a paid plan. Use `dns` for DNS records and `mx` for mail routing. |
310
275
  | Email | A metered mailbox check with deliverability, catch-all, status, reason and address hints, using included email checks or enabled on-demand usage. |
311
- | VAT | A metered registry check where supported, using included VAT checks or enabled on-demand usage. |
312
276
  | Phone, Time, Date, Currency, Language, Emoji, Bank, Point | Optional detail in the same pooled request on every plan. |
313
277
  | Country, State, District, City, Postal | The place profile on paid plans, including demographic and tax facts where held. |
314
278
  | Name, Industry | Name evidence or the industry definition profile on paid plans. |
315
- | NPI | Deactivation date, Medicare enrollment, opt-out and enrollment rows from stored sources on paid plans. Exclusion evidence stays core. |
316
- | Vehicle, Tariff, Company | The complete product detail bag on paid plans. |
279
+ | Company | The complete product detail bag on paid plans. |
317
280
  | Weather | Specialist current measurements and the existing forecast, alert, air and history bag on paid plans. |
318
281
  | Carrier, HLR | Optional diagnostic detail within the same metered core unit, including Free allowance units. No second gate or additional check. |
319
282
 
@@ -353,7 +316,7 @@ parse = ParseAPI.new(
353
316
  )
354
317
  ```
355
318
 
356
- Ordinary lookups retry network errors and HTTP 429, 500, 502, 503, and 504 up to twice. Carrier, caller, and HLR lookups, plus email and VAT with `deep: true`, make one attempt by default because repeating them can repeat paid usage. Address with `deep: true` also uses one attempt, reserving that behavior for future verification. This does not mean address deep currently has a separate charge.
319
+ Ordinary lookups retry network errors and HTTP 429, 500, 502, 503, and 504 up to twice. Carrier, caller, and HLR lookups, plus email with `deep: true`, make one attempt by default because repeating them can repeat paid usage. Address with `deep: true` also uses one attempt, reserving that behavior for future verification. This does not mean address deep currently has a separate charge.
357
320
 
358
321
  Pass `retries: 0` to make every lookup a single attempt. An explicit count such as `retries: 2` applies to every lookup, including paid ones. A retried request can count toward usage even when the first response was lost. Omit `retries` or pass `nil` to use the defaults above.
359
322
 
@@ -420,8 +383,6 @@ Successful checks may be reused for up to 24 hours. `pretty` optionally formats
420
383
 
421
384
  Stack defaults to a 35-second transport timeout so a first scan has time to finish. Other lookups retain their 10-second default. An explicit client timeout takes precedence.
422
385
 
423
- Vehicle lookups use `vin` as the input and response field. Existing VIN methods remain available for compatibility.
424
-
425
386
  ## Emoji catalog additions
426
387
 
427
388
  Resolve Unicode emoji or a named shortcode, search or browse a bounded catalog,
@@ -470,7 +431,6 @@ Collection options include minimum and maximum population, an exact IANA timezon
470
431
  Collections support `name`, `population`, `country` and `elevation`; search also supports `relevance`, and nearby supports `distance`. Combine up to three signed terms, for example `sort=-population,name`. A signed multi-key sort does not also take `order`. Population defaults to descending order; other sorts default to ascending. Set `order` to `asc` or `desc`, except relevance only supports ascending. Named nearby uses country and state to select the anchor; population, timezone and bounding box filter the returned neighbors. Coordinate nearby applies country and state to its returned cities.
471
432
 
472
433
 
473
-
474
434
  ## Canonical City operations
475
435
 
476
436
  Classic lookup, search, nearest and named-nearby methods retain their default envelopes and required-field models. Browse and coordinate-nearby use canonical lists: `object`, `data` and nullable `next_cursor` (camelCase properties in Swift/Kotlin). Keep all query options unchanged when continuing a page; no client fetches pages automatically.
@@ -490,7 +450,6 @@ Reviewed children, ancestors and siblings use canonical lists with partial relat
490
450
  Strict `ambiguity=error` can return HTTP 409 `ambiguous_city` with up to two safe candidate identities. The existing error constructor and unrelated error metadata are preserved; candidates are retained only for that status/code and never contain Deep. GeoJSON is available through HTTP; these typed City list methods do not return GeoJSON.
491
451
 
492
452
 
493
-
494
453
  Reviewed name forms:
495
454
 
496
455
  ```ruby
@@ -78,13 +78,7 @@ module ParseAPI
78
78
  get("/continent/#{seg(code)}/countries", lang: lang)
79
79
  end
80
80
 
81
- def bloc(code)
82
- get("/bloc/#{seg(code)}")
83
- end
84
81
 
85
- def bloc_countries(code, lang: nil)
86
- get("/bloc/#{seg(code)}/countries", lang: lang)
87
- end
88
82
 
89
83
  def country(code, deep: false, lang: nil)
90
84
  get("/country/#{seg(code)}", deep: deep, lang: lang)
@@ -221,12 +215,6 @@ module ParseAPI
221
215
  get("/email/#{seg(email)}", deep: deep)
222
216
  end
223
217
 
224
- # Check VAT format and checksum. Deep requests a metered registry check where supported. Deep
225
- # checks use one attempt by default. Supply your own VAT number for a consultation reference
226
- # when supported.
227
- def vat(number, country: nil, deep: false, from: nil)
228
- get("/vat/#{seg(number)}", country: country, deep: deep, from: from)
229
- end
230
218
 
231
219
  def iban(iban, country: nil, deep: false)
232
220
  get("/iban/#{seg(iban)}", country: country, deep: deep)
@@ -236,9 +224,6 @@ module ParseAPI
236
224
  get("/bin/#{seg(bin)}", deep: deep)
237
225
  end
238
226
 
239
- def npi(npi, deep: false, lang: nil)
240
- get("/npi/#{seg(npi)}", deep: deep, lang: lang)
241
- end
242
227
 
243
228
  def bank(iban, country: nil, deep: false)
244
229
  get("/bank", {}, {}, { iban: iban, country: country, deep: deep }.reject { |_key, value| value.nil? })
@@ -261,9 +246,6 @@ module ParseAPI
261
246
  get('/bank/requirements', country: country, format: format)
262
247
  end
263
248
 
264
- def provider(npi, deep: false, lang: nil)
265
- get("/provider/#{seg(npi)}", deep: deep, lang: lang)
266
- end
267
249
 
268
250
  # Parse a phone number and its formats. Pass country for national numbers when needed. Deep
269
251
  # adds numbering-plan geography on every plan. Carrier, caller, and HLR are separate metered lookups.
@@ -322,14 +304,6 @@ module ParseAPI
322
304
  get('/useragent', { deep: deep }, { 'User-Agent' => ua })
323
305
  end
324
306
 
325
- def vehicle(vin, deep: false)
326
- get("/vehicle/#{seg(vin)}", deep: deep)
327
- end
328
-
329
- def vin(vin, deep: false)
330
- get("/vin/#{seg(vin)}", deep: deep)
331
- end
332
-
333
307
  # US NAICS 2022 definition and hierarchy.
334
308
  # Compatibility names for Industry.
335
309
  def naics(code, deep: false)
@@ -349,17 +323,7 @@ module ParseAPI
349
323
  get('/industry', q: query, limit: limit, deep: deep)
350
324
  end
351
325
 
352
- # Look up the general US duty schedule line. Paid deep adds units and the special and other
353
- # schedule columns. Add origin with deep to resolve country-specific measures. Without origin,
354
- # schedule detail remains available and origin-dependent fields are null. A null effective rate
355
- # is not a zero rate.
356
- def tariff(code, deep: false, origin: nil, edition: nil, date: nil)
357
- tariff_selection(get("/tariff/#{seg(code)}", deep: deep, origin: origin, edition: edition, date: date), edition, date)
358
- end
359
326
 
360
- def tariff_search(query, edition: nil, date: nil)
361
- tariff_selection(get('/tariff', q: query, edition: edition, date: date), edition, date)
362
- end
363
327
 
364
328
  def currency(code, deep: false, lang: nil)
365
329
  get("/currency/#{seg(code)}", deep: deep, lang: lang)
@@ -506,16 +470,7 @@ module ParseAPI
506
470
  targets.join(',')
507
471
  end
508
472
 
509
- def tariff_edition_id?(value)
510
- value.is_a?(String) && (/\A[a-f0-9]{64}\z/.match?(value) || (/\Ated_[1-9][0-9]{0,19}\z/.match?(value) && (value.bytesize < 24 || value[4..-1] <= '18446744073709551615')))
511
- end
512
473
 
513
- def tariff_selection(result, edition, date)
514
- if (!edition.nil? || !date.nil?) && (!tariff_edition_id?(result['edition']) || (!edition.nil? && result['edition'] != edition) || result['date'] != date)
515
- raise Error.new(status: 0, code: 'tariff_selection_mismatch', message: 'Tariff response did not confirm the requested edition/date. The server may not support this selection.')
516
- end
517
- result
518
- end
519
474
 
520
475
 
521
476
  def seg(value)
@@ -1,3 +1,3 @@
1
1
  module ParseAPI
2
- VERSION = '1.10.0'.freeze
2
+ VERSION = '1.10.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parseapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ParseAPI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-16 00:00:00.000000000 Z
11
+ date: 2026-10-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: