candidhealth 0.20.1 → 0.21.0

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: 94b3a175528969c827073ea49581fdc53a6d31abf6f70494c3b3ad6a1fec2b3a
4
- data.tar.gz: 6a8a0a368226fbf299abe0d9275535d42a73a76b3a739498da1db804c622b3ee
3
+ metadata.gz: 4e2b9e45ff99c41a146ed25541c02929775eb6adee44c7fde13754caa5dde3c6
4
+ data.tar.gz: eec617c6b632b0092078fe9b614a6ba87148c8129d2ef89978c872bd81d73848
5
5
  SHA512:
6
- metadata.gz: 844c6dbfb1e7ab00b512e00108d4222614e18ecb71c666cf9af7fd91bb109b46a0046dfe3ad6f6482b6f19dd2b9607cc20b7fc789bbac1240caa9ccbaa2d2959
7
- data.tar.gz: 0cec3cd4b40306370fed79c06621ed937dc39ef7193605a5bba7098ca7b882ab668dc657c4a366e3f55202aaf43cbbb82ed40cdd5517758163aed44212954ed6
6
+ metadata.gz: 5ede0cf3d8acfa994f8d14bbf97d9fb9af9d413f892c99a1f5086e9205eaa6c8e5e5cf0529891e65f88579d530774e22e2700f329f37a9ab1760e10c0bef8f8c
7
+ data.tar.gz: 4220d63500d9a2c8e5937e822dfba737e295e4a66a7f3362421bb505f29e72677fb80a54a94e7b7c4eece6cd30cc22bfd47511f71b8919123fd42e0b336e666d
@@ -3,6 +3,14 @@
3
3
  require_relative "../../../requests"
4
4
  require_relative "types/create_import_invoice_request"
5
5
  require_relative "types/import_invoice"
6
+ require_relative "../../commons/types/patient_external_id"
7
+ require_relative "../../commons/types/encounter_external_id"
8
+ require "date"
9
+ require_relative "../../invoices/v_2/types/invoice_status"
10
+ require_relative "../../invoices/v_2/types/invoice_sort_field"
11
+ require_relative "../../commons/types/sort_direction"
12
+ require_relative "../../commons/types/page_token"
13
+ require_relative "types/import_invoices_page"
6
14
  require_relative "../../commons/types/invoice_id"
7
15
  require_relative "types/import_invoice_update_request"
8
16
  require "async"
@@ -43,6 +51,43 @@ module CandidApiClient
43
51
  ImportInvoice::V1::ImportInvoice.from_json(json_object: response.body)
44
52
  end
45
53
 
54
+ # Returns all Invoices for the authenticated user's organziation with all filters applied.
55
+ #
56
+ # @param patient_external_id [Commons::PATIENT_EXTERNAL_ID]
57
+ # @param encounter_external_id [Commons::ENCOUNTER_EXTERNAL_ID]
58
+ # @param note [String] partial match supported
59
+ # @param due_date_before [Date] all invoices whose due date is before this due date, not inclusive
60
+ # @param due_date_after [Date] all invoices whose due date is after this due date, not inclusive
61
+ # @param status [Invoices::V2::InvoiceStatus] all invoices that match any of the provided statuses
62
+ # @param limit [Integer] Defaults to 100
63
+ # @param sort [Invoices::V2::InvoiceSortField] Defaults to created_at
64
+ # @param sort_direction [Commons::SortDirection] Sort direction. Defaults to descending order
65
+ # @param page_token [Commons::PAGE_TOKEN]
66
+ # @param request_options [RequestOptions]
67
+ # @return [ImportInvoice::V1::ImportInvoicesPage]
68
+ def get_multi(patient_external_id: nil, encounter_external_id: nil, note: nil, due_date_before: nil,
69
+ due_date_after: nil, status: nil, limit: nil, sort: nil, sort_direction: nil, page_token: nil, request_options: nil)
70
+ response = @request_client.conn.get("/api/import-invoice/v1") do |req|
71
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
72
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
73
+ req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact
74
+ req.params = {
75
+ **(request_options&.additional_query_parameters || {}),
76
+ "patient_external_id": patient_external_id,
77
+ "encounter_external_id": encounter_external_id,
78
+ "note": note,
79
+ "due_date_before": due_date_before,
80
+ "due_date_after": due_date_after,
81
+ "status": status,
82
+ "limit": limit,
83
+ "sort": sort,
84
+ "sort_direction": sort_direction,
85
+ "page_token": page_token
86
+ }.compact
87
+ end
88
+ ImportInvoice::V1::ImportInvoicesPage.from_json(json_object: response.body)
89
+ end
90
+
46
91
  # Retrieve and view an import invoice
47
92
  #
48
93
  # @param invoice_id [Commons::INVOICE_ID] InvoiceId to be returned
@@ -116,6 +161,45 @@ module CandidApiClient
116
161
  end
117
162
  end
118
163
 
164
+ # Returns all Invoices for the authenticated user's organziation with all filters applied.
165
+ #
166
+ # @param patient_external_id [Commons::PATIENT_EXTERNAL_ID]
167
+ # @param encounter_external_id [Commons::ENCOUNTER_EXTERNAL_ID]
168
+ # @param note [String] partial match supported
169
+ # @param due_date_before [Date] all invoices whose due date is before this due date, not inclusive
170
+ # @param due_date_after [Date] all invoices whose due date is after this due date, not inclusive
171
+ # @param status [Invoices::V2::InvoiceStatus] all invoices that match any of the provided statuses
172
+ # @param limit [Integer] Defaults to 100
173
+ # @param sort [Invoices::V2::InvoiceSortField] Defaults to created_at
174
+ # @param sort_direction [Commons::SortDirection] Sort direction. Defaults to descending order
175
+ # @param page_token [Commons::PAGE_TOKEN]
176
+ # @param request_options [RequestOptions]
177
+ # @return [ImportInvoice::V1::ImportInvoicesPage]
178
+ def get_multi(patient_external_id: nil, encounter_external_id: nil, note: nil, due_date_before: nil,
179
+ due_date_after: nil, status: nil, limit: nil, sort: nil, sort_direction: nil, page_token: nil, request_options: nil)
180
+ Async do
181
+ response = @request_client.conn.get("/api/import-invoice/v1") do |req|
182
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
183
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
184
+ req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact
185
+ req.params = {
186
+ **(request_options&.additional_query_parameters || {}),
187
+ "patient_external_id": patient_external_id,
188
+ "encounter_external_id": encounter_external_id,
189
+ "note": note,
190
+ "due_date_before": due_date_before,
191
+ "due_date_after": due_date_after,
192
+ "status": status,
193
+ "limit": limit,
194
+ "sort": sort,
195
+ "sort_direction": sort_direction,
196
+ "page_token": page_token
197
+ }.compact
198
+ end
199
+ ImportInvoice::V1::ImportInvoicesPage.from_json(json_object: response.body)
200
+ end
201
+ end
202
+
119
203
  # Retrieve and view an import invoice
120
204
  #
121
205
  # @param invoice_id [Commons::INVOICE_ID] InvoiceId to be returned
@@ -0,0 +1,65 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "import_invoice"
4
+ require_relative "../../../commons/types/page_token"
5
+ require "json"
6
+
7
+ module CandidApiClient
8
+ module ImportInvoice
9
+ module V1
10
+ class ImportInvoicesPage
11
+ attr_reader :items, :prev_page_token, :next_page_token, :additional_properties
12
+
13
+ # @param items [Array<ImportInvoice::V1::ImportInvoice>]
14
+ # @param prev_page_token [Commons::PAGE_TOKEN]
15
+ # @param next_page_token [Commons::PAGE_TOKEN]
16
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
17
+ # @return [ImportInvoice::V1::ImportInvoicesPage]
18
+ def initialize(items:, prev_page_token: nil, next_page_token: nil, additional_properties: nil)
19
+ # @type [Array<ImportInvoice::V1::ImportInvoice>]
20
+ @items = items
21
+ # @type [Commons::PAGE_TOKEN]
22
+ @prev_page_token = prev_page_token
23
+ # @type [Commons::PAGE_TOKEN]
24
+ @next_page_token = next_page_token
25
+ # @type [OpenStruct] Additional properties unmapped to the current class definition
26
+ @additional_properties = additional_properties
27
+ end
28
+
29
+ # Deserialize a JSON object to an instance of ImportInvoicesPage
30
+ #
31
+ # @param json_object [JSON]
32
+ # @return [ImportInvoice::V1::ImportInvoicesPage]
33
+ def self.from_json(json_object:)
34
+ struct = JSON.parse(json_object, object_class: OpenStruct)
35
+ parsed_json = JSON.parse(json_object)
36
+ items = parsed_json["items"]&.map do |v|
37
+ v = v.to_json
38
+ ImportInvoice::V1::ImportInvoice.from_json(json_object: v)
39
+ end
40
+ prev_page_token = struct.prev_page_token
41
+ next_page_token = struct.next_page_token
42
+ new(items: items, prev_page_token: prev_page_token, next_page_token: next_page_token,
43
+ additional_properties: struct)
44
+ end
45
+
46
+ # Serialize an instance of ImportInvoicesPage to a JSON object
47
+ #
48
+ # @return [JSON]
49
+ def to_json(*_args)
50
+ { "items": @items, "prev_page_token": @prev_page_token, "next_page_token": @next_page_token }.to_json
51
+ end
52
+
53
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
54
+ #
55
+ # @param obj [Object]
56
+ # @return [Void]
57
+ def self.validate_raw(obj:)
58
+ obj.items.is_a?(Array) != false || raise("Passed value for field obj.items is not the expected type, validation failed.")
59
+ obj.prev_page_token&.is_a?(String) != false || raise("Passed value for field obj.prev_page_token is not the expected type, validation failed.")
60
+ obj.next_page_token&.is_a?(String) != false || raise("Passed value for field obj.next_page_token is not the expected type, validation failed.")
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module Invoices
5
+ module V2
6
+ class InvoiceSortField
7
+ CREATED_AT = "CREATED_AT"
8
+ UPDATED_AT = "UPDATED_AT"
9
+ PATIENT_EXTERNAL_ID = "PATIENT_EXTERNAL_ID"
10
+ NOTE = "NOTE"
11
+ DUE_DATE = "DUE_DATE"
12
+ STATUS = "STATUS"
13
+ end
14
+ end
15
+ end
16
+ end
data/lib/requests.rb CHANGED
@@ -20,7 +20,7 @@ module CandidApiClient
20
20
  @headers = {
21
21
  "X-Fern-Language": "Ruby",
22
22
  "X-Fern-SDK-Name": "candidhealth",
23
- "X-Fern-SDK-Version": "0.20.1",
23
+ "X-Fern-SDK-Version": "0.21.0",
24
24
  "Authorization": "Bearer #{token}"
25
25
  }
26
26
  @conn = Faraday.new(@base_url, headers: @headers) do |faraday|
@@ -46,7 +46,7 @@ module CandidApiClient
46
46
  @headers = {
47
47
  "X-Fern-Language": "Ruby",
48
48
  "X-Fern-SDK-Name": "candidhealth",
49
- "X-Fern-SDK-Version": "0.20.1",
49
+ "X-Fern-SDK-Version": "0.21.0",
50
50
  "Authorization": "Bearer #{token}"
51
51
  }
52
52
  @conn = Faraday.new(@base_url, headers: @headers) do |faraday|
data/lib/types_export.rb CHANGED
@@ -119,6 +119,7 @@ require_relative "candidhealth/guarantor/v_1/types/encounter_has_existing_guaran
119
119
  require_relative "candidhealth/import_invoice/v_1/types/import_invoice"
120
120
  require_relative "candidhealth/import_invoice/v_1/types/create_import_invoice_request"
121
121
  require_relative "candidhealth/import_invoice/v_1/types/invoice_item_update_type"
122
+ require_relative "candidhealth/import_invoice/v_1/types/import_invoices_page"
122
123
  require_relative "candidhealth/import_invoice/v_1/types/invoice_item_info_update"
123
124
  require_relative "candidhealth/import_invoice/v_1/types/import_invoice_update_request"
124
125
  require_relative "candidhealth/insurance_adjudications/v_1/types/insurance_adjudication_id"
@@ -143,6 +144,7 @@ require_relative "candidhealth/insurance_refunds/v_1/types/insurance_refund"
143
144
  require_relative "candidhealth/insurance_refunds/v_1/types/insurance_refund_create"
144
145
  require_relative "candidhealth/insurance_refunds/v_1/types/insurance_refunds_page"
145
146
  require_relative "candidhealth/insurance_refunds/v_1/types/insurance_refund_sort_field"
147
+ require_relative "candidhealth/invoices/v_2/types/invoice_sort_field"
146
148
  require_relative "candidhealth/invoices/v_2/types/invoice_destination"
147
149
  require_relative "candidhealth/invoices/v_2/types/invoice_status"
148
150
  require_relative "candidhealth/invoices/v_2/types/invoice_destination_metadata"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: candidhealth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.1
4
+ version: 0.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-24 00:00:00.000000000 Z
11
+ date: 2024-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-http-faraday
@@ -327,6 +327,7 @@ files:
327
327
  - lib/candidhealth/import_invoice/v_1/types/create_import_invoice_request.rb
328
328
  - lib/candidhealth/import_invoice/v_1/types/import_invoice.rb
329
329
  - lib/candidhealth/import_invoice/v_1/types/import_invoice_update_request.rb
330
+ - lib/candidhealth/import_invoice/v_1/types/import_invoices_page.rb
330
331
  - lib/candidhealth/import_invoice/v_1/types/invoice_item_info_update.rb
331
332
  - lib/candidhealth/import_invoice/v_1/types/invoice_item_update_type.rb
332
333
  - lib/candidhealth/individual/types/gender.rb
@@ -378,6 +379,7 @@ files:
378
379
  - lib/candidhealth/invoices/v_2/types/invoice_item_attribution_create.rb
379
380
  - lib/candidhealth/invoices/v_2/types/invoice_item_create.rb
380
381
  - lib/candidhealth/invoices/v_2/types/invoice_item_info.rb
382
+ - lib/candidhealth/invoices/v_2/types/invoice_sort_field.rb
381
383
  - lib/candidhealth/invoices/v_2/types/invoice_status.rb
382
384
  - lib/candidhealth/invoices/v_2/types/service_line_invoice_item.rb
383
385
  - lib/candidhealth/invoices/v_2/types/unattributed_invoice_item.rb