candidhealth 0.25.0 → 0.26.1

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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/service_lines/v_2/client.rb +4 -40
  3. data/lib/candidhealth/service_lines/v_2/types/service_line.rb +1 -43
  4. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +2 -82
  5. data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +2 -82
  6. data/lib/candidhealth/third_party_payer_payments/client.rb +30 -0
  7. data/lib/candidhealth/third_party_payer_payments/v_1/client.rb +360 -0
  8. data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment.rb +138 -0
  9. data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment_create.rb +124 -0
  10. data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment_sort_field.rb +14 -0
  11. data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payments_page.rb +88 -0
  12. data/lib/candidhealth/third_party_payer_refunds/client.rb +30 -0
  13. data/lib/candidhealth/third_party_payer_refunds/v_1/client.rb +385 -0
  14. data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund.rb +139 -0
  15. data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund_create.rb +125 -0
  16. data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund_sort_field.rb +14 -0
  17. data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refunds_page.rb +88 -0
  18. data/lib/candidhealth/third_party_payers/client.rb +30 -0
  19. data/lib/candidhealth/third_party_payers/v_1/client.rb +375 -0
  20. data/lib/candidhealth/third_party_payers/v_1/types/create_third_party_payer_request.rb +79 -0
  21. data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer.rb +100 -0
  22. data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_category_update.rb +97 -0
  23. data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_description_update.rb +97 -0
  24. data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_page.rb +88 -0
  25. data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_sort_field.rb +16 -0
  26. data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_update_request.rb +92 -0
  27. data/lib/candidhealth/third_party_payers/v_1/types/toggle_third_party_payer_enablement_request.rb +61 -0
  28. data/lib/candidhealth.rb +21 -0
  29. data/lib/requests.rb +2 -2
  30. data/lib/types_export.rb +16 -4
  31. metadata +23 -5
  32. data/lib/candidhealth/invoices/types/invoice.rb +0 -169
  33. data/lib/candidhealth/invoices/types/invoice_item.rb +0 -68
  34. data/lib/candidhealth/invoices/types/invoice_status.rb +0 -16
  35. data/lib/candidhealth/service_lines/v_2/types/service_line_era_data.rb +0 -78
@@ -1,169 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "date"
4
- require_relative "invoice_status"
5
- require_relative "invoice_item"
6
- require "ostruct"
7
- require "json"
8
-
9
- module CandidApiClient
10
- module Invoices
11
- module Types
12
- class Invoice
13
- # @return [String]
14
- attr_reader :id
15
- # @return [DateTime]
16
- attr_reader :created_at
17
- # @return [DateTime]
18
- attr_reader :updated_at
19
- # @return [String]
20
- attr_reader :organzation_id
21
- # @return [String]
22
- attr_reader :source_id
23
- # @return [String]
24
- attr_reader :source_customer_id
25
- # @return [String]
26
- attr_reader :patient_external_id
27
- # @return [String]
28
- attr_reader :note
29
- # @return [String]
30
- attr_reader :due_date
31
- # @return [CandidApiClient::Invoices::Types::InvoiceStatus]
32
- attr_reader :status
33
- # @return [String]
34
- attr_reader :url
35
- # @return [String]
36
- attr_reader :customer_invoice_url
37
- # @return [Array<CandidApiClient::Invoices::Types::InvoiceItem>]
38
- attr_reader :items
39
- # @return [OpenStruct] Additional properties unmapped to the current class definition
40
- attr_reader :additional_properties
41
- # @return [Object]
42
- attr_reader :_field_set
43
- protected :_field_set
44
-
45
- OMIT = Object.new
46
-
47
- # @param id [String]
48
- # @param created_at [DateTime]
49
- # @param updated_at [DateTime]
50
- # @param organzation_id [String]
51
- # @param source_id [String]
52
- # @param source_customer_id [String]
53
- # @param patient_external_id [String]
54
- # @param note [String]
55
- # @param due_date [String]
56
- # @param status [CandidApiClient::Invoices::Types::InvoiceStatus]
57
- # @param url [String]
58
- # @param customer_invoice_url [String]
59
- # @param items [Array<CandidApiClient::Invoices::Types::InvoiceItem>]
60
- # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
61
- # @return [CandidApiClient::Invoices::Types::Invoice]
62
- def initialize(id:, created_at:, updated_at:, organzation_id:, source_id:, source_customer_id:,
63
- patient_external_id:, due_date:, status:, items:, note: OMIT, url: OMIT, customer_invoice_url: OMIT, additional_properties: nil)
64
- @id = id
65
- @created_at = created_at
66
- @updated_at = updated_at
67
- @organzation_id = organzation_id
68
- @source_id = source_id
69
- @source_customer_id = source_customer_id
70
- @patient_external_id = patient_external_id
71
- @note = note if note != OMIT
72
- @due_date = due_date
73
- @status = status
74
- @url = url if url != OMIT
75
- @customer_invoice_url = customer_invoice_url if customer_invoice_url != OMIT
76
- @items = items
77
- @additional_properties = additional_properties
78
- @_field_set = {
79
- "id": id,
80
- "created_at": created_at,
81
- "updated_at": updated_at,
82
- "organzation_id": organzation_id,
83
- "source_id": source_id,
84
- "source_customer_id": source_customer_id,
85
- "patient_external_id": patient_external_id,
86
- "note": note,
87
- "due_date": due_date,
88
- "status": status,
89
- "url": url,
90
- "customer_invoice_url": customer_invoice_url,
91
- "items": items
92
- }.reject do |_k, v|
93
- v == OMIT
94
- end
95
- end
96
-
97
- # Deserialize a JSON object to an instance of Invoice
98
- #
99
- # @param json_object [String]
100
- # @return [CandidApiClient::Invoices::Types::Invoice]
101
- def self.from_json(json_object:)
102
- struct = JSON.parse(json_object, object_class: OpenStruct)
103
- parsed_json = JSON.parse(json_object)
104
- id = struct["id"]
105
- created_at = (DateTime.parse(parsed_json["created_at"]) unless parsed_json["created_at"].nil?)
106
- updated_at = (DateTime.parse(parsed_json["updated_at"]) unless parsed_json["updated_at"].nil?)
107
- organzation_id = struct["organzation_id"]
108
- source_id = struct["source_id"]
109
- source_customer_id = struct["source_customer_id"]
110
- patient_external_id = struct["patient_external_id"]
111
- note = struct["note"]
112
- due_date = struct["due_date"]
113
- status = struct["status"]
114
- url = struct["url"]
115
- customer_invoice_url = struct["customer_invoice_url"]
116
- items = parsed_json["items"]&.map do |item|
117
- item = item.to_json
118
- CandidApiClient::Invoices::Types::InvoiceItem.from_json(json_object: item)
119
- end
120
- new(
121
- id: id,
122
- created_at: created_at,
123
- updated_at: updated_at,
124
- organzation_id: organzation_id,
125
- source_id: source_id,
126
- source_customer_id: source_customer_id,
127
- patient_external_id: patient_external_id,
128
- note: note,
129
- due_date: due_date,
130
- status: status,
131
- url: url,
132
- customer_invoice_url: customer_invoice_url,
133
- items: items,
134
- additional_properties: struct
135
- )
136
- end
137
-
138
- # Serialize an instance of Invoice to a JSON object
139
- #
140
- # @return [String]
141
- def to_json(*_args)
142
- @_field_set&.to_json
143
- end
144
-
145
- # Leveraged for Union-type generation, validate_raw attempts to parse the given
146
- # hash and check each fields type against the current object's property
147
- # definitions.
148
- #
149
- # @param obj [Object]
150
- # @return [Void]
151
- def self.validate_raw(obj:)
152
- obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
153
- obj.created_at.is_a?(DateTime) != false || raise("Passed value for field obj.created_at is not the expected type, validation failed.")
154
- obj.updated_at.is_a?(DateTime) != false || raise("Passed value for field obj.updated_at is not the expected type, validation failed.")
155
- obj.organzation_id.is_a?(String) != false || raise("Passed value for field obj.organzation_id is not the expected type, validation failed.")
156
- obj.source_id.is_a?(String) != false || raise("Passed value for field obj.source_id is not the expected type, validation failed.")
157
- obj.source_customer_id.is_a?(String) != false || raise("Passed value for field obj.source_customer_id is not the expected type, validation failed.")
158
- obj.patient_external_id.is_a?(String) != false || raise("Passed value for field obj.patient_external_id is not the expected type, validation failed.")
159
- obj.note&.is_a?(String) != false || raise("Passed value for field obj.note is not the expected type, validation failed.")
160
- obj.due_date.is_a?(String) != false || raise("Passed value for field obj.due_date is not the expected type, validation failed.")
161
- obj.status.is_a?(CandidApiClient::Invoices::Types::InvoiceStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
162
- obj.url&.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.")
163
- obj.customer_invoice_url&.is_a?(String) != false || raise("Passed value for field obj.customer_invoice_url is not the expected type, validation failed.")
164
- obj.items.is_a?(Array) != false || raise("Passed value for field obj.items is not the expected type, validation failed.")
165
- end
166
- end
167
- end
168
- end
169
- end
@@ -1,68 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "ostruct"
4
- require "json"
5
-
6
- module CandidApiClient
7
- module Invoices
8
- module Types
9
- class InvoiceItem
10
- # @return [String]
11
- attr_reader :service_line_id
12
- # @return [Integer]
13
- attr_reader :amount_cents
14
- # @return [OpenStruct] Additional properties unmapped to the current class definition
15
- attr_reader :additional_properties
16
- # @return [Object]
17
- attr_reader :_field_set
18
- protected :_field_set
19
-
20
- OMIT = Object.new
21
-
22
- # @param service_line_id [String]
23
- # @param amount_cents [Integer]
24
- # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
25
- # @return [CandidApiClient::Invoices::Types::InvoiceItem]
26
- def initialize(service_line_id:, amount_cents:, additional_properties: nil)
27
- @service_line_id = service_line_id
28
- @amount_cents = amount_cents
29
- @additional_properties = additional_properties
30
- @_field_set = { "service_line_id": service_line_id, "amount_cents": amount_cents }
31
- end
32
-
33
- # Deserialize a JSON object to an instance of InvoiceItem
34
- #
35
- # @param json_object [String]
36
- # @return [CandidApiClient::Invoices::Types::InvoiceItem]
37
- def self.from_json(json_object:)
38
- struct = JSON.parse(json_object, object_class: OpenStruct)
39
- service_line_id = struct["service_line_id"]
40
- amount_cents = struct["amount_cents"]
41
- new(
42
- service_line_id: service_line_id,
43
- amount_cents: amount_cents,
44
- additional_properties: struct
45
- )
46
- end
47
-
48
- # Serialize an instance of InvoiceItem to a JSON object
49
- #
50
- # @return [String]
51
- def to_json(*_args)
52
- @_field_set&.to_json
53
- end
54
-
55
- # Leveraged for Union-type generation, validate_raw attempts to parse the given
56
- # hash and check each fields type against the current object's property
57
- # definitions.
58
- #
59
- # @param obj [Object]
60
- # @return [Void]
61
- def self.validate_raw(obj:)
62
- obj.service_line_id.is_a?(String) != false || raise("Passed value for field obj.service_line_id is not the expected type, validation failed.")
63
- obj.amount_cents.is_a?(Integer) != false || raise("Passed value for field obj.amount_cents is not the expected type, validation failed.")
64
- end
65
- end
66
- end
67
- end
68
- end
@@ -1,16 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module CandidApiClient
4
- module Invoices
5
- module Types
6
- class InvoiceStatus
7
- DRAFT = "draft"
8
- OPEN = "open"
9
- PAID = "paid"
10
- VOID = "void"
11
- UNCOLLECTIBLE = "uncollectible"
12
- HELD = "held"
13
- end
14
- end
15
- end
16
- end
@@ -1,78 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "service_line_adjustment"
4
- require "ostruct"
5
- require "json"
6
-
7
- module CandidApiClient
8
- module ServiceLines
9
- module V2
10
- module Types
11
- class ServiceLineEraData
12
- # @return [Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineAdjustment>]
13
- attr_reader :service_line_adjustments
14
- # @return [Array<String>]
15
- attr_reader :remittance_advice_remark_codes
16
- # @return [OpenStruct] Additional properties unmapped to the current class definition
17
- attr_reader :additional_properties
18
- # @return [Object]
19
- attr_reader :_field_set
20
- protected :_field_set
21
-
22
- OMIT = Object.new
23
-
24
- # @param service_line_adjustments [Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineAdjustment>]
25
- # @param remittance_advice_remark_codes [Array<String>]
26
- # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
27
- # @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineEraData]
28
- def initialize(service_line_adjustments:, remittance_advice_remark_codes:, additional_properties: nil)
29
- @service_line_adjustments = service_line_adjustments
30
- @remittance_advice_remark_codes = remittance_advice_remark_codes
31
- @additional_properties = additional_properties
32
- @_field_set = {
33
- "service_line_adjustments": service_line_adjustments,
34
- "remittance_advice_remark_codes": remittance_advice_remark_codes
35
- }
36
- end
37
-
38
- # Deserialize a JSON object to an instance of ServiceLineEraData
39
- #
40
- # @param json_object [String]
41
- # @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineEraData]
42
- def self.from_json(json_object:)
43
- struct = JSON.parse(json_object, object_class: OpenStruct)
44
- parsed_json = JSON.parse(json_object)
45
- service_line_adjustments = parsed_json["service_line_adjustments"]&.map do |item|
46
- item = item.to_json
47
- CandidApiClient::ServiceLines::V2::Types::ServiceLineAdjustment.from_json(json_object: item)
48
- end
49
- remittance_advice_remark_codes = struct["remittance_advice_remark_codes"]
50
- new(
51
- service_line_adjustments: service_line_adjustments,
52
- remittance_advice_remark_codes: remittance_advice_remark_codes,
53
- additional_properties: struct
54
- )
55
- end
56
-
57
- # Serialize an instance of ServiceLineEraData to a JSON object
58
- #
59
- # @return [String]
60
- def to_json(*_args)
61
- @_field_set&.to_json
62
- end
63
-
64
- # Leveraged for Union-type generation, validate_raw attempts to parse the given
65
- # hash and check each fields type against the current object's property
66
- # definitions.
67
- #
68
- # @param obj [Object]
69
- # @return [Void]
70
- def self.validate_raw(obj:)
71
- obj.service_line_adjustments.is_a?(Array) != false || raise("Passed value for field obj.service_line_adjustments is not the expected type, validation failed.")
72
- obj.remittance_advice_remark_codes.is_a?(Array) != false || raise("Passed value for field obj.remittance_advice_remark_codes is not the expected type, validation failed.")
73
- end
74
- end
75
- end
76
- end
77
- end
78
- end