Class: CandidApiClient::BillingNotes::V2::V2Client
- Inherits:
-
Object
- Object
- CandidApiClient::BillingNotes::V2::V2Client
- 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::V2Client constructor
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::BillingNotes::V2::V2Client
17 18 19 |
# File 'lib/candidhealth/billing_notes/v_2/client.rb', line 17 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::RequestClient (readonly)
13 14 15 |
# File 'lib/candidhealth/billing_notes/v_2/client.rb', line 13 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
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/candidhealth/billing_notes/v_2/client.rb', line 30 def create(text:, encounter_id:, additional_properties: nil, _field_set: nil, request_options: nil) 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 |