Class: CandidApiClient::NonInsurancePayerPayments::V1::V1Client
- Inherits:
-
Object
- Object
- CandidApiClient::NonInsurancePayerPayments::V1::V1Client
- Defined in:
- lib/candidhealth/non_insurance_payer_payments/v_1/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
- #create(request:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPayment
-
#delete(non_insurance_payer_payment_id:, request_options: nil) ⇒ Void
Deletes the non-insurance payer payment record matching the provided ‘non_insurance_payer_payment_id`.
-
#get(non_insurance_payer_payment_id:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPayment
Retrieves a previously created non-insurance payer payment by its ‘non_insurance_payer_payment_id`.
-
#get_multi(limit: nil, non_insurance_payer_id: nil, check_number: nil, invoice_id: nil, sort: nil, sort_direction: nil, page_token: nil, request_options: nil) ⇒ CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPaymentsPage
Returns all non-insurance payer payments.
- #initialize(request_client:) ⇒ CandidApiClient::NonInsurancePayerPayments::V1::V1Client constructor
- #update(non_insurance_payer_payment_id:, payment_timestamp: nil, payment_note: nil, invoice_id: nil, request_options: nil) ⇒ CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPayment
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::NonInsurancePayerPayments::V1::V1Client
23 24 25 |
# File 'lib/candidhealth/non_insurance_payer_payments/v_1/client.rb', line 23 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::RequestClient (readonly)
19 20 21 |
# File 'lib/candidhealth/non_insurance_payer_payments/v_1/client.rb', line 19 def request_client @request_client end |
Instance Method Details
#create(request:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPayment
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/candidhealth/non_insurance_payer_payments/v_1/client.rb', line 104 def create(request:, 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 = { **(request || {}), **(&.additional_body_parameters || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/non-insurance-payer-payments/v1" end CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPayment.from_json(json_object: response.body) end |
#delete(non_insurance_payer_payment_id:, request_options: nil) ⇒ Void
Deletes the non-insurance payer payment record matching the provided
`non_insurance_payer_payment_id`.
160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/candidhealth/non_insurance_payer_payments/v_1/client.rb', line 160 def delete(non_insurance_payer_payment_id:, request_options: nil) @request_client.conn.delete 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.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/non-insurance-payer-payments/v1/#{non_insurance_payer_payment_id}" end end |
#get(non_insurance_payer_payment_id:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPayment
Retrieves a previously created non-insurance payer payment by its
`non_insurance_payer_payment_id`.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/candidhealth/non_insurance_payer_payments/v_1/client.rb', line 76 def get(non_insurance_payer_payment_id:, request_options: nil) response = @request_client.conn.get 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.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/non-insurance-payer-payments/v1/#{non_insurance_payer_payment_id}" end CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPayment.from_json(json_object: response.body) end |
#get_multi(limit: nil, non_insurance_payer_id: nil, check_number: nil, invoice_id: nil, sort: nil, sort_direction: nil, page_token: nil, request_options: nil) ⇒ CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPaymentsPage
Returns all non-insurance payer payments
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/candidhealth/non_insurance_payer_payments/v_1/client.rb', line 41 def get_multi(limit: nil, non_insurance_payer_id: nil, check_number: nil, invoice_id: nil, sort: nil, sort_direction: nil, page_token: nil, request_options: nil) response = @request_client.conn.get 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.params = { **(&.additional_query_parameters || {}), "limit": limit, "non_insurance_payer_id": non_insurance_payer_id, "check_number": check_number, "invoice_id": invoice_id, "sort": sort, "sort_direction": sort_direction, "page_token": page_token }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/non-insurance-payer-payments/v1" end CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPaymentsPage.from_json(json_object: response.body) end |
#update(non_insurance_payer_payment_id:, payment_timestamp: nil, payment_note: nil, invoice_id: nil, request_options: nil) ⇒ CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPayment
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/candidhealth/non_insurance_payer_payments/v_1/client.rb', line 129 def update(non_insurance_payer_payment_id:, payment_timestamp: nil, payment_note: nil, invoice_id: nil, request_options: nil) response = @request_client.conn.patch 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 || {}), payment_timestamp: , payment_note: payment_note, invoice_id: invoice_id }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/non-insurance-payer-payments/v1/#{non_insurance_payer_payment_id}" end CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPayment.from_json(json_object: response.body) end |