Class: CandidApiClient::BillingNotes::V2::AsyncV2Client
- Inherits:
-
Object
- Object
- CandidApiClient::BillingNotes::V2::AsyncV2Client
- Defined in:
- lib/candidhealth/billing_notes/v_2/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
- #create(text:, encounter_id:, additional_properties: nil, _field_set: nil, request_options: nil) ⇒ CandidApiClient::BillingNotes::V2::Types::BillingNote
- #initialize(request_client:) ⇒ CandidApiClient::BillingNotes::V2::AsyncV2Client constructor
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::BillingNotes::V2::AsyncV2Client
59 60 61 |
# File 'lib/candidhealth/billing_notes/v_2/client.rb', line 59 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::AsyncRequestClient (readonly)
55 56 57 |
# File 'lib/candidhealth/billing_notes/v_2/client.rb', line 55 def request_client @request_client end |
Instance Method Details
#create(text:, encounter_id:, additional_properties: nil, _field_set: nil, request_options: nil) ⇒ CandidApiClient::BillingNotes::V2::Types::BillingNote
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/candidhealth/billing_notes/v_2/client.rb', line 72 def create(text:, encounter_id:, additional_properties: nil, _field_set: nil, request_options: nil) Async do response = @request_client.conn.post do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.body = { **(&.additional_body_parameters || {}), text: text, additional_properties: additional_properties, _field_set: _field_set, encounter_id: encounter_id }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/billing_notes/v2" end CandidApiClient::BillingNotes::V2::Types::BillingNote.from_json(json_object: response.body) end end |