Class: CandidApiClient::ImportInvoice::V1::Types::ImportInvoiceUpdateRequest
- Inherits:
-
Object
- Object
- CandidApiClient::ImportInvoice::V1::Types::ImportInvoiceUpdateRequest
- Defined in:
- lib/candidhealth/import_invoice/v_1/types/import_invoice_update_request.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#customer_invoice_url ⇒ String
readonly
Link to the patient view of the invoice in the third-party service.
- #due_date ⇒ Date readonly
-
#items ⇒ CandidApiClient::ImportInvoice::V1::Types::InvoiceItemInfoUpdate
readonly
None here represents there is no update to the invoice items.
- #note ⇒ String readonly
- #status ⇒ CandidApiClient::Invoices::V2::Types::InvoiceStatus readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::ImportInvoice::V1::Types::ImportInvoiceUpdateRequest
Deserialize a JSON object to an instance of ImportInvoiceUpdateRequest.
-
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object’s property definitions.
Instance Method Summary collapse
- #initialize(customer_invoice_url: OMIT, status: OMIT, note: OMIT, due_date: OMIT, items: OMIT, additional_properties: nil) ⇒ CandidApiClient::ImportInvoice::V1::Types::ImportInvoiceUpdateRequest constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of ImportInvoiceUpdateRequest to a JSON object.
Constructor Details
#initialize(customer_invoice_url: OMIT, status: OMIT, note: OMIT, due_date: OMIT, items: OMIT, additional_properties: nil) ⇒ CandidApiClient::ImportInvoice::V1::Types::ImportInvoiceUpdateRequest
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/candidhealth/import_invoice/v_1/types/import_invoice_update_request.rb', line 39 def initialize(customer_invoice_url: OMIT, status: OMIT, note: OMIT, due_date: OMIT, items: OMIT, additional_properties: nil) @customer_invoice_url = customer_invoice_url if customer_invoice_url != OMIT @status = status if status != OMIT @note = note if note != OMIT @due_date = due_date if due_date != OMIT @items = items if items != OMIT @additional_properties = additional_properties @_field_set = { "customer_invoice_url": customer_invoice_url, "status": status, "note": note, "due_date": due_date, "items": items }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
25 26 27 |
# File 'lib/candidhealth/import_invoice/v_1/types/import_invoice_update_request.rb', line 25 def additional_properties @additional_properties end |
#customer_invoice_url ⇒ String (readonly)
Returns Link to the patient view of the invoice in the third-party service.
15 16 17 |
# File 'lib/candidhealth/import_invoice/v_1/types/import_invoice_update_request.rb', line 15 def customer_invoice_url @customer_invoice_url end |
#due_date ⇒ Date (readonly)
21 22 23 |
# File 'lib/candidhealth/import_invoice/v_1/types/import_invoice_update_request.rb', line 21 def due_date @due_date end |
#items ⇒ CandidApiClient::ImportInvoice::V1::Types::InvoiceItemInfoUpdate (readonly)
Returns None here represents there is no update to the invoice items.
23 24 25 |
# File 'lib/candidhealth/import_invoice/v_1/types/import_invoice_update_request.rb', line 23 def items @items end |
#note ⇒ String (readonly)
19 20 21 |
# File 'lib/candidhealth/import_invoice/v_1/types/import_invoice_update_request.rb', line 19 def note @note end |
#status ⇒ CandidApiClient::Invoices::V2::Types::InvoiceStatus (readonly)
17 18 19 |
# File 'lib/candidhealth/import_invoice/v_1/types/import_invoice_update_request.rb', line 17 def status @status end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::ImportInvoice::V1::Types::ImportInvoiceUpdateRequest
Deserialize a JSON object to an instance of ImportInvoiceUpdateRequest
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/candidhealth/import_invoice/v_1/types/import_invoice_update_request.rb', line 62 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) customer_invoice_url = struct["customer_invoice_url"] status = struct["status"] note = struct["note"] due_date = (Date.parse(parsed_json["due_date"]) unless parsed_json["due_date"].nil?) if parsed_json["items"].nil? items = nil else items = parsed_json["items"].to_json items = CandidApiClient::ImportInvoice::V1::Types::InvoiceItemInfoUpdate.from_json(json_object: items) end new( customer_invoice_url: customer_invoice_url, status: status, note: note, due_date: due_date, items: items, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given
hash and check each fields type against the current object's property
definitions.
98 99 100 101 102 103 104 |
# File 'lib/candidhealth/import_invoice/v_1/types/import_invoice_update_request.rb', line 98 def self.validate_raw(obj:) obj.customer_invoice_url&.is_a?(String) != false || raise("Passed value for field obj.customer_invoice_url is not the expected type, validation failed.") obj.status&.is_a?(CandidApiClient::Invoices::V2::Types::InvoiceStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.") obj.note&.is_a?(String) != false || raise("Passed value for field obj.note is not the expected type, validation failed.") obj.due_date&.is_a?(Date) != false || raise("Passed value for field obj.due_date is not the expected type, validation failed.") obj.items.nil? || CandidApiClient::ImportInvoice::V1::Types::InvoiceItemInfoUpdate.validate_raw(obj: obj.items) end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of ImportInvoiceUpdateRequest to a JSON object
88 89 90 |
# File 'lib/candidhealth/import_invoice/v_1/types/import_invoice_update_request.rb', line 88 def to_json(*_args) @_field_set&.to_json end |