Class: Pago::V2026_04::Models::OrganizationCustomerPortalSettings
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ usage: "usage", subscription: "subscription", customer: "customer" }.freeze
- REQUIRED_KEYS =
["usage", "subscription"].freeze
Instance Attribute Summary collapse
- #customer ⇒ Models::CustomerPortalCustomerSettings readonly
- #subscription ⇒ Models::CustomerPortalSubscriptionSettings readonly
- #usage ⇒ Models::CustomerPortalUsageSettings readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(usage:, subscription:, customer: ::Pago::UNSET) ⇒ OrganizationCustomerPortalSettings
constructor
A new instance of OrganizationCustomerPortalSettings.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(usage:, subscription:, customer: ::Pago::UNSET) ⇒ OrganizationCustomerPortalSettings
Returns a new instance of OrganizationCustomerPortalSettings.
34648 34649 34650 34651 34652 34653 34654 34655 34656 34657 |
# File 'lib/pago/v2026_04/models.rb', line 34648 def initialize( usage:, subscription:, customer: ::Pago::UNSET ) super() assign(:usage, usage) assign(:subscription, subscription) assign(:customer, customer) end |
Instance Attribute Details
#customer ⇒ Models::CustomerPortalCustomerSettings (readonly)
34646 34647 34648 |
# File 'lib/pago/v2026_04/models.rb', line 34646 def customer @customer end |
#subscription ⇒ Models::CustomerPortalSubscriptionSettings (readonly)
34643 34644 34645 |
# File 'lib/pago/v2026_04/models.rb', line 34643 def subscription @subscription end |
#usage ⇒ Models::CustomerPortalUsageSettings (readonly)
34640 34641 34642 |
# File 'lib/pago/v2026_04/models.rb', line 34640 def usage @usage end |
Class Method Details
.from_json(data) ⇒ OrganizationCustomerPortalSettings?
34661 34662 34663 34664 34665 34666 34667 34668 34669 34670 34671 34672 34673 34674 |
# File 'lib/pago/v2026_04/models.rb', line 34661 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( usage: (data.key?("usage") ? Models::CustomerPortalUsageSettings.from_json(data["usage"]) : ::Pago::UNSET), subscription: (data.key?("subscription") ? Models::CustomerPortalSubscriptionSettings.from_json(data["subscription"]) : ::Pago::UNSET), customer: (data.key?("customer") ? Models::CustomerPortalCustomerSettings.from_json(data["customer"]) : ::Pago::UNSET) ), data ) end |