candidhealth 0.42.4 → 0.42.5

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: 6b671d3bda89bb33840c329d6c95b5af3faacef26f0e74d38b8b9a3dde6fa728
4
- data.tar.gz: f32153bc3c5da8c18bf060c27e903e43c2220956ae4c06fd8f012569ec763400
3
+ metadata.gz: 9bfb76c43078304ca5d9f9ca77e043de008b1d051a63c256783d2dc58a6121ee
4
+ data.tar.gz: 8d986a7938e2b77bce1d32a8dd3547137baadba9bbd889747e02ffd63ebd784b
5
5
  SHA512:
6
- metadata.gz: 196e12d220c97eb8547dde5d72cd9d46c2cd0990c9c58cc11d0927fb059eace7b733a5f98c5a2a10834af3a9bdf655b5869f4eb49f6883c7705a4776c8445e0e
7
- data.tar.gz: d4dc0a8fc78b694d243e617b9ddaa07df3617c426df0ad94b05ad98776485c7349f79d0452041acd048e2cf43cc5e63a69727cf78e699ed29ec0ca0e10a7f5df
6
+ metadata.gz: c80c380649b2302fc02f03496f2dfafab1a02cc95fdc48447b85f84817744af74ae64f8716f3bdd3a3cce75300a987230d2e27d16306a51edb9dfa89674e22c9
7
+ data.tar.gz: c061c1d6640bb76163cea03b8de64510b0ed25b7816a4a24316297974b647f056876ca2316d824902b6b72734775f54ce58c70b4633beafac6bd342b587595ff
@@ -0,0 +1,112 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "date"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module CandidApiClient
8
+ module BillingNotes
9
+ module V2
10
+ module Types
11
+ class BillingNoteOptional
12
+ # @return [String]
13
+ attr_reader :billing_note_id
14
+ # @return [String]
15
+ attr_reader :encounter_id
16
+ # @return [DateTime] An [RFC 3339, section 5.6 datetime](https://ijmacd.github.io/rfc3339-iso8601/).
17
+ # For example, 2017-07-21T17:32:28Z.
18
+ attr_reader :created_at
19
+ # @return [String]
20
+ attr_reader :author_auth_0_id
21
+ # @return [String]
22
+ attr_reader :author_name
23
+ # @return [String] Empty string not allowed.
24
+ attr_reader :text
25
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
26
+ attr_reader :additional_properties
27
+ # @return [Object]
28
+ attr_reader :_field_set
29
+ protected :_field_set
30
+
31
+ OMIT = Object.new
32
+
33
+ # @param billing_note_id [String]
34
+ # @param encounter_id [String]
35
+ # @param created_at [DateTime] An [RFC 3339, section 5.6 datetime](https://ijmacd.github.io/rfc3339-iso8601/).
36
+ # For example, 2017-07-21T17:32:28Z.
37
+ # @param author_auth_0_id [String]
38
+ # @param author_name [String]
39
+ # @param text [String] Empty string not allowed.
40
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
41
+ # @return [CandidApiClient::BillingNotes::V2::Types::BillingNoteOptional]
42
+ def initialize(billing_note_id:, created_at:, text:, encounter_id: OMIT, author_auth_0_id: OMIT,
43
+ author_name: OMIT, additional_properties: nil)
44
+ @billing_note_id = billing_note_id
45
+ @encounter_id = encounter_id if encounter_id != OMIT
46
+ @created_at = created_at
47
+ @author_auth_0_id = author_auth_0_id if author_auth_0_id != OMIT
48
+ @author_name = author_name if author_name != OMIT
49
+ @text = text
50
+ @additional_properties = additional_properties
51
+ @_field_set = {
52
+ "billing_note_id": billing_note_id,
53
+ "encounter_id": encounter_id,
54
+ "created_at": created_at,
55
+ "author_auth0_id": author_auth_0_id,
56
+ "author_name": author_name,
57
+ "text": text
58
+ }.reject do |_k, v|
59
+ v == OMIT
60
+ end
61
+ end
62
+
63
+ # Deserialize a JSON object to an instance of BillingNoteOptional
64
+ #
65
+ # @param json_object [String]
66
+ # @return [CandidApiClient::BillingNotes::V2::Types::BillingNoteOptional]
67
+ def self.from_json(json_object:)
68
+ struct = JSON.parse(json_object, object_class: OpenStruct)
69
+ parsed_json = JSON.parse(json_object)
70
+ billing_note_id = struct["billing_note_id"]
71
+ encounter_id = struct["encounter_id"]
72
+ created_at = (DateTime.parse(parsed_json["created_at"]) unless parsed_json["created_at"].nil?)
73
+ author_auth_0_id = struct["author_auth0_id"]
74
+ author_name = struct["author_name"]
75
+ text = struct["text"]
76
+ new(
77
+ billing_note_id: billing_note_id,
78
+ encounter_id: encounter_id,
79
+ created_at: created_at,
80
+ author_auth_0_id: author_auth_0_id,
81
+ author_name: author_name,
82
+ text: text,
83
+ additional_properties: struct
84
+ )
85
+ end
86
+
87
+ # Serialize an instance of BillingNoteOptional to a JSON object
88
+ #
89
+ # @return [String]
90
+ def to_json(*_args)
91
+ @_field_set&.to_json
92
+ end
93
+
94
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
95
+ # hash and check each fields type against the current object's property
96
+ # definitions.
97
+ #
98
+ # @param obj [Object]
99
+ # @return [Void]
100
+ def self.validate_raw(obj:)
101
+ obj.billing_note_id.is_a?(String) != false || raise("Passed value for field obj.billing_note_id is not the expected type, validation failed.")
102
+ obj.encounter_id&.is_a?(String) != false || raise("Passed value for field obj.encounter_id is not the expected type, validation failed.")
103
+ obj.created_at.is_a?(DateTime) != false || raise("Passed value for field obj.created_at is not the expected type, validation failed.")
104
+ obj.author_auth_0_id&.is_a?(String) != false || raise("Passed value for field obj.author_auth_0_id is not the expected type, validation failed.")
105
+ obj.author_name&.is_a?(String) != false || raise("Passed value for field obj.author_name is not the expected type, validation failed.")
106
+ obj.text.is_a?(String) != false || raise("Passed value for field obj.text is not the expected type, validation failed.")
107
+ end
108
+ end
109
+ end
110
+ end
111
+ end
112
+ end
@@ -35,7 +35,7 @@ module CandidApiClient
35
35
  # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
36
36
  # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
37
37
  # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
38
- # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNote>)
38
+ # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteOptional>)
39
39
  # * :benefits_assigned_to_provider (Boolean)
40
40
  # * :prior_authorization_number (String)
41
41
  # * :external_id (String)
@@ -347,7 +347,7 @@ module CandidApiClient
347
347
  # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
348
348
  # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
349
349
  # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
350
- # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNote>)
350
+ # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteOptional>)
351
351
  # * :benefits_assigned_to_provider (Boolean)
352
352
  # * :prior_authorization_number (String)
353
353
  # * :external_id (String)
@@ -851,7 +851,7 @@ module CandidApiClient
851
851
  # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
852
852
  # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
853
853
  # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
854
- # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNote>)
854
+ # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteOptional>)
855
855
  # * :benefits_assigned_to_provider (Boolean)
856
856
  # * :prior_authorization_number (String)
857
857
  # * :external_id (String)
@@ -1167,7 +1167,7 @@ module CandidApiClient
1167
1167
  # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
1168
1168
  # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
1169
1169
  # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
1170
- # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNote>)
1170
+ # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteOptional>)
1171
1171
  # * :benefits_assigned_to_provider (Boolean)
1172
1172
  # * :prior_authorization_number (String)
1173
1173
  # * :external_id (String)
@@ -5,7 +5,7 @@ require_relative "../../../encounters/v_4/types/intervention"
5
5
  require_relative "../../../claim_submission/v_1/types/external_claim_submission_create"
6
6
  require_relative "../../../service_lines/v_2/types/service_line_create"
7
7
  require_relative "../../../encounters/v_4/types/patient_history_category"
8
- require_relative "../../../billing_notes/v_2/types/billing_note"
8
+ require_relative "../../../billing_notes/v_2/types/billing_note_optional"
9
9
  require "date"
10
10
  require_relative "../../../encounters/v_4/types/clinical_note_category_create"
11
11
  require_relative "../../../commons/types/street_address_long_zip"
@@ -56,7 +56,7 @@ module CandidApiClient
56
56
  attr_reader :service_lines
57
57
  # @return [Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>]
58
58
  attr_reader :patient_histories
59
- # @return [Array<CandidApiClient::BillingNotes::V2::Types::BillingNote>] Spot to store misc, human-readable, notes about this encounter to be
59
+ # @return [Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteOptional>] Spot to store misc, human-readable, notes about this encounter to be
60
60
  # used in the billing process.
61
61
  attr_reader :billing_notes
62
62
  # @return [Boolean] Whether this patient has authorized insurance payments to be made to you, not
@@ -253,7 +253,7 @@ module CandidApiClient
253
253
  # `service_line.diagnosis_pointers`must contain at least one entry which should be
254
254
  # in bounds of the diagnoses list field.
255
255
  # @param patient_histories [Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>]
256
- # @param billing_notes [Array<CandidApiClient::BillingNotes::V2::Types::BillingNote>] Spot to store misc, human-readable, notes about this encounter to be
256
+ # @param billing_notes [Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteOptional>] Spot to store misc, human-readable, notes about this encounter to be
257
257
  # used in the billing process.
258
258
  # @param benefits_assigned_to_provider [Boolean] Whether this patient has authorized insurance payments to be made to you, not
259
259
  # them. If false, patient may receive reimbursement. Box 13 on the CMS-1500 claim
@@ -524,7 +524,7 @@ module CandidApiClient
524
524
  end
525
525
  billing_notes = parsed_json["billing_notes"]&.map do |item|
526
526
  item = item.to_json
527
- CandidApiClient::BillingNotes::V2::Types::BillingNote.from_json(json_object: item)
527
+ CandidApiClient::BillingNotes::V2::Types::BillingNoteOptional.from_json(json_object: item)
528
528
  end
529
529
  benefits_assigned_to_provider = struct["benefits_assigned_to_provider"]
530
530
  prior_authorization_number = struct["prior_authorization_number"]
data/lib/requests.rb CHANGED
@@ -43,7 +43,7 @@ module CandidApiClient
43
43
 
44
44
  # @return [Hash{String => String}]
45
45
  def get_headers
46
- headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.42.4" }
46
+ headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.42.5" }
47
47
  headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
48
48
  headers
49
49
  end
@@ -87,7 +87,7 @@ module CandidApiClient
87
87
 
88
88
  # @return [Hash{String => String}]
89
89
  def get_headers
90
- headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.42.4" }
90
+ headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.42.5" }
91
91
  headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
92
92
  headers
93
93
  end
data/lib/types_export.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  require_relative "candidhealth/auth/v_2/types/auth_get_token_response"
4
4
  require_relative "candidhealth/auth/v_2/types/too_many_requests_error_type"
5
5
  require_relative "candidhealth/billing_notes/v_2/types/billing_note_base"
6
+ require_relative "candidhealth/billing_notes/v_2/types/billing_note_optional"
6
7
  require_relative "candidhealth/billing_notes/v_2/types/billing_note"
7
8
  require_relative "candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle_page"
8
9
  require_relative "candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle"
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.42.4
4
+ version: 0.42.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-05-07 00:00:00.000000000 Z
11
+ date: 2025-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-http-faraday
@@ -105,6 +105,7 @@ files:
105
105
  - lib/candidhealth/billing_notes/v_2/client.rb
106
106
  - lib/candidhealth/billing_notes/v_2/types/billing_note.rb
107
107
  - lib/candidhealth/billing_notes/v_2/types/billing_note_base.rb
108
+ - lib/candidhealth/billing_notes/v_2/types/billing_note_optional.rb
108
109
  - lib/candidhealth/charge_capture/client.rb
109
110
  - lib/candidhealth/charge_capture/v_1/client.rb
110
111
  - lib/candidhealth/charge_capture/v_1/types/charge_capture.rb