Class: CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPaymentsPage
- Inherits:
-
Object
- Object
- CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPaymentsPage
- Defined in:
- lib/candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payments_page.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #items ⇒ Array<CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPayment> readonly
- #next_page_token ⇒ String readonly
- #prev_page_token ⇒ String readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPaymentsPage
Deserialize a JSON object to an instance of NonInsurancePayerPaymentsPage.
-
.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(items:, prev_page_token: OMIT, next_page_token: OMIT, additional_properties: nil) ⇒ CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPaymentsPage constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of NonInsurancePayerPaymentsPage to a JSON object.
Constructor Details
#initialize(items:, prev_page_token: OMIT, next_page_token: OMIT, additional_properties: nil) ⇒ CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPaymentsPage
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payments_page.rb', line 31 def initialize(items:, prev_page_token: OMIT, next_page_token: OMIT, additional_properties: nil) @items = items @prev_page_token = prev_page_token if prev_page_token != OMIT @next_page_token = next_page_token if next_page_token != OMIT @additional_properties = additional_properties @_field_set = { "items": items, "prev_page_token": prev_page_token, "next_page_token": next_page_token }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
19 20 21 |
# File 'lib/candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payments_page.rb', line 19 def additional_properties @additional_properties end |
#items ⇒ Array<CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPayment> (readonly)
13 14 15 |
# File 'lib/candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payments_page.rb', line 13 def items @items end |
#next_page_token ⇒ String (readonly)
17 18 19 |
# File 'lib/candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payments_page.rb', line 17 def next_page_token @next_page_token end |
#prev_page_token ⇒ String (readonly)
15 16 17 |
# File 'lib/candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payments_page.rb', line 15 def prev_page_token @prev_page_token end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPaymentsPage
Deserialize a JSON object to an instance of NonInsurancePayerPaymentsPage
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payments_page.rb', line 49 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) items = parsed_json["items"]&.map do |item| item = item.to_json CandidApiClient::NonInsurancePayerPayments::V1::Types::NonInsurancePayerPayment.from_json(json_object: item) end prev_page_token = struct["prev_page_token"] next_page_token = struct["next_page_token"] new( items: items, prev_page_token: prev_page_token, next_page_token: next_page_token, 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.
79 80 81 82 83 |
# File 'lib/candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payments_page.rb', line 79 def self.validate_raw(obj:) obj.items.is_a?(Array) != false || raise("Passed value for field obj.items is not the expected type, validation failed.") obj.prev_page_token&.is_a?(String) != false || raise("Passed value for field obj.prev_page_token is not the expected type, validation failed.") obj.next_page_token&.is_a?(String) != false || raise("Passed value for field obj.next_page_token is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of NonInsurancePayerPaymentsPage to a JSON object
69 70 71 |
# File 'lib/candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payments_page.rb', line 69 def to_json(*_args) @_field_set&.to_json end |