Class: Pago::V2026_04::Models::CustomerOrganizationData
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Schema of an organization and related data for customer portal.
Constant Summary collapse
- JSON_KEYS =
{ organization: "organization", products: "products" }.freeze
- REQUIRED_KEYS =
["organization", "products"].freeze
Instance Attribute Summary collapse
- #organization ⇒ Models::CustomerOrganization readonly
- #products ⇒ Array<Models::CustomerProduct> readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(organization:, products:) ⇒ CustomerOrganizationData
constructor
A new instance of CustomerOrganizationData.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(organization:, products:) ⇒ CustomerOrganizationData
Returns a new instance of CustomerOrganizationData.
18374 18375 18376 18377 18378 18379 18380 18381 |
# File 'lib/pago/v2026_04/models.rb', line 18374 def initialize( organization:, products: ) super() assign(:organization, organization) assign(:products, products) end |
Instance Attribute Details
#organization ⇒ Models::CustomerOrganization (readonly)
18369 18370 18371 |
# File 'lib/pago/v2026_04/models.rb', line 18369 def organization @organization end |
#products ⇒ Array<Models::CustomerProduct> (readonly)
18372 18373 18374 |
# File 'lib/pago/v2026_04/models.rb', line 18372 def products @products end |
Class Method Details
.from_json(data) ⇒ CustomerOrganizationData?
18385 18386 18387 18388 18389 18390 18391 18392 18393 18394 18395 18396 18397 |
# File 'lib/pago/v2026_04/models.rb', line 18385 def self.from_json(data) data = ::JSON.parse(data) if data.is_a?(String) data = ::Pago::Serde.object(data) return nil if data.nil? wrap_raw( new( organization: (data.key?("organization") ? Models::CustomerOrganization.from_json(data["organization"]) : ::Pago::UNSET), products: (data.key?("products") ? ::Pago::Serde.array(data["products"]) { |item0| Models::CustomerProduct.from_json(item0) } : ::Pago::UNSET) ), data ) end |