Class: Pago::V2026_04::Models::Organization

Inherits:
Model
  • Object
show all
Defined in:
lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  created_at: "created_at",
  modified_at: "modified_at",
  id: "id",
  name: "name",
  slug: "slug",
  avatar_url: "avatar_url",
  proration_behavior: "proration_behavior",
  allow_customer_updates: "allow_customer_updates",
  email: "email",
  website: "website",
  socials: "socials",
  status: "status",
  details_submitted_at: "details_submitted_at",
  sso_enforced: "sso_enforced",
  default_presentment_currency: "default_presentment_currency",
  default_tax_behavior: "default_tax_behavior",
  feature_settings: "feature_settings",
  subscription_settings: "subscription_settings",
  customer_email_settings: "customer_email_settings",
  customer_portal_settings: "customer_portal_settings",
  country: "country",
  account_id: "account_id",
  payout_account_id: "payout_account_id",
  capabilities: "capabilities"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["created_at", "modified_at", "id", "name", "slug", "avatar_url", "proration_behavior", "allow_customer_updates", "email", "website", "socials", "status", "details_submitted_at", "sso_enforced", "default_presentment_currency", "default_tax_behavior", "feature_settings", "subscription_settings", "customer_email_settings", "customer_portal_settings", "account_id", "payout_account_id", "capabilities"].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw

Constructor Details

#initialize(created_at:, modified_at:, id:, name:, slug:, avatar_url:, proration_behavior:, allow_customer_updates:, email:, website:, socials:, status:, details_submitted_at:, sso_enforced:, default_presentment_currency:, default_tax_behavior:, feature_settings:, subscription_settings:, customer_email_settings:, customer_portal_settings:, country: ::Pago::UNSET, account_id:, payout_account_id:, capabilities:) ⇒ Organization

Returns a new instance of Organization.

Parameters:



33946
33947
33948
33949
33950
33951
33952
33953
33954
33955
33956
33957
33958
33959
33960
33961
33962
33963
33964
33965
33966
33967
33968
33969
33970
33971
33972
33973
33974
33975
33976
33977
33978
33979
33980
33981
33982
33983
33984
33985
33986
33987
33988
33989
33990
33991
33992
33993
33994
33995
33996
33997
# File 'lib/pago/v2026_04/models.rb', line 33946

def initialize(
  created_at:,
  modified_at:,
  id:,
  name:,
  slug:,
  avatar_url:,
  proration_behavior:,
  allow_customer_updates:,
  email:,
  website:,
  socials:,
  status:,
  details_submitted_at:,
  sso_enforced:,
  default_presentment_currency:,
  default_tax_behavior:,
  feature_settings:,
  subscription_settings:,
  customer_email_settings:,
  customer_portal_settings:,
  country: ::Pago::UNSET,
  account_id:,
  payout_account_id:,
  capabilities:
)
  super()
  assign(:created_at, created_at)
  assign(:modified_at, modified_at)
  assign(:id, id)
  assign(:name, name)
  assign(:slug, slug)
  assign(:avatar_url, avatar_url)
  assign(:proration_behavior, proration_behavior)
  assign(:allow_customer_updates, allow_customer_updates)
  assign(:email, email)
  assign(:website, website)
  assign(:socials, socials)
  assign(:status, status)
  assign(:details_submitted_at, )
  assign(:sso_enforced, sso_enforced)
  assign(:default_presentment_currency, default_presentment_currency)
  assign(:default_tax_behavior, default_tax_behavior)
  assign(:feature_settings, feature_settings)
  assign(:subscription_settings, subscription_settings)
  assign(:customer_email_settings, customer_email_settings)
  assign(:customer_portal_settings, customer_portal_settings)
  assign(:country, country)
  assign(:account_id, )
  assign(:payout_account_id, )
  assign(:capabilities, capabilities)
end

Instance Attribute Details

#account_idString? (readonly)

ID of the transactions account.

Returns:

  • (String, nil)


33937
33938
33939
# File 'lib/pago/v2026_04/models.rb', line 33937

def 
  @account_id
end

#allow_customer_updatesBoolean (readonly)

Whether customers can update their subscriptions from the customer portal.

Returns:

  • (Boolean)


33886
33887
33888
# File 'lib/pago/v2026_04/models.rb', line 33886

def allow_customer_updates
  @allow_customer_updates
end

#avatar_urlString? (readonly)

Avatar URL shown in checkout, customer portal, emails etc.

Returns:

  • (String, nil)


33879
33880
33881
# File 'lib/pago/v2026_04/models.rb', line 33879

def avatar_url
  @avatar_url
end

#capabilitiesModels::OrganizationCapabilities (readonly)



33944
33945
33946
# File 'lib/pago/v2026_04/models.rb', line 33944

def capabilities
  @capabilities
end

#countryString? (readonly)

Two-letter country code (ISO 3166-1 alpha-2).

Returns:

  • (String, nil)


33933
33934
33935
# File 'lib/pago/v2026_04/models.rb', line 33933

def country
  @country
end

#created_atString (readonly)

Creation timestamp of the object.

Returns:

  • (String)


33859
33860
33861
# File 'lib/pago/v2026_04/models.rb', line 33859

def created_at
  @created_at
end

#customer_email_settingsModels::OrganizationCustomerEmailSettings (readonly)



33926
33927
33928
# File 'lib/pago/v2026_04/models.rb', line 33926

def customer_email_settings
  @customer_email_settings
end

#customer_portal_settingsModels::OrganizationCustomerPortalSettings (readonly)



33929
33930
33931
# File 'lib/pago/v2026_04/models.rb', line 33929

def customer_portal_settings
  @customer_portal_settings
end

#default_presentment_currencyString (readonly)

Default presentment currency. Used as fallback in checkout and customer portal, if the customer's local currency is not available.

Returns:

  • (String)


33913
33914
33915
# File 'lib/pago/v2026_04/models.rb', line 33913

def default_presentment_currency
  @default_presentment_currency
end

#default_tax_behaviorString (readonly)

Returns:

  • (String)


33916
33917
33918
# File 'lib/pago/v2026_04/models.rb', line 33916

def default_tax_behavior
  @default_tax_behavior
end

#details_submitted_atString? (readonly)

When the business details were submitted for review.

Returns:

  • (String, nil)


33905
33906
33907
# File 'lib/pago/v2026_04/models.rb', line 33905

def 
  @details_submitted_at
end

#emailString? (readonly)

Public support email.

Returns:

  • (String, nil)


33890
33891
33892
# File 'lib/pago/v2026_04/models.rb', line 33890

def email
  @email
end

#feature_settingsModels::OrganizationFeatureSettings? (readonly)

Organization feature settings



33920
33921
33922
# File 'lib/pago/v2026_04/models.rb', line 33920

def feature_settings
  @feature_settings
end

#idString (readonly)

The ID of the object.

Returns:

  • (String)


33867
33868
33869
# File 'lib/pago/v2026_04/models.rb', line 33867

def id
  @id
end

#modified_atString? (readonly)

Last modification timestamp of the object.

Returns:

  • (String, nil)


33863
33864
33865
# File 'lib/pago/v2026_04/models.rb', line 33863

def modified_at
  @modified_at
end

#nameString (readonly)

Organization name shown in checkout, customer portal, emails etc.

Returns:

  • (String)


33871
33872
33873
# File 'lib/pago/v2026_04/models.rb', line 33871

def name
  @name
end

#payout_account_idString? (readonly)

ID of the payout account.

Returns:

  • (String, nil)


33941
33942
33943
# File 'lib/pago/v2026_04/models.rb', line 33941

def 
  @payout_account_id
end

#proration_behaviorString (readonly)

Returns:

  • (String)


33882
33883
33884
# File 'lib/pago/v2026_04/models.rb', line 33882

def proration_behavior
  @proration_behavior
end

#slugString (readonly)

Unique organization slug in checkout, customer portal and credit card statements.

Returns:

  • (String)


33875
33876
33877
# File 'lib/pago/v2026_04/models.rb', line 33875

def slug
  @slug
end

#socialsArray<Models::OrganizationSocialLink> (readonly)

Links to social profiles.

Returns:



33898
33899
33900
# File 'lib/pago/v2026_04/models.rb', line 33898

def socials
  @socials
end

#sso_enforcedBoolean (readonly)

Whether members must access this organization through its SSO connection.

Returns:

  • (Boolean)


33909
33910
33911
# File 'lib/pago/v2026_04/models.rb', line 33909

def sso_enforced
  @sso_enforced
end

#statusString (readonly)

Returns:

  • (String)


33901
33902
33903
# File 'lib/pago/v2026_04/models.rb', line 33901

def status
  @status
end

#subscription_settingsModels::OrganizationSubscriptionSettings (readonly)



33923
33924
33925
# File 'lib/pago/v2026_04/models.rb', line 33923

def subscription_settings
  @subscription_settings
end

#websiteString? (readonly)

Official website of the organization.

Returns:

  • (String, nil)


33894
33895
33896
# File 'lib/pago/v2026_04/models.rb', line 33894

def website
  @website
end

Class Method Details

.from_json(data) ⇒ Organization?

Parameters:

  • data (Hash, String, nil)

Returns:



34001
34002
34003
34004
34005
34006
34007
34008
34009
34010
34011
34012
34013
34014
34015
34016
34017
34018
34019
34020
34021
34022
34023
34024
34025
34026
34027
34028
34029
34030
34031
34032
34033
34034
34035
# File 'lib/pago/v2026_04/models.rb', line 34001

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(
      created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET),
      modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET),
      id: (data.key?("id") ? data["id"] : ::Pago::UNSET),
      name: (data.key?("name") ? data["name"] : ::Pago::UNSET),
      slug: (data.key?("slug") ? data["slug"] : ::Pago::UNSET),
      avatar_url: (data.key?("avatar_url") ? data["avatar_url"] : ::Pago::UNSET),
      proration_behavior: (data.key?("proration_behavior") ? data["proration_behavior"] : ::Pago::UNSET),
      allow_customer_updates: (data.key?("allow_customer_updates") ? data["allow_customer_updates"] : ::Pago::UNSET),
      email: (data.key?("email") ? data["email"] : ::Pago::UNSET),
      website: (data.key?("website") ? data["website"] : ::Pago::UNSET),
      socials: (data.key?("socials") ? ::Pago::Serde.array(data["socials"]) { |item0| Models::OrganizationSocialLink.from_json(item0) } : ::Pago::UNSET),
      status: (data.key?("status") ? data["status"] : ::Pago::UNSET),
      details_submitted_at: (data.key?("details_submitted_at") ? data["details_submitted_at"] : ::Pago::UNSET),
      sso_enforced: (data.key?("sso_enforced") ? data["sso_enforced"] : ::Pago::UNSET),
      default_presentment_currency: (data.key?("default_presentment_currency") ? data["default_presentment_currency"] : ::Pago::UNSET),
      default_tax_behavior: (data.key?("default_tax_behavior") ? data["default_tax_behavior"] : ::Pago::UNSET),
      feature_settings: (data.key?("feature_settings") ? Models::OrganizationFeatureSettings.from_json(data["feature_settings"]) : ::Pago::UNSET),
      subscription_settings: (data.key?("subscription_settings") ? Models::OrganizationSubscriptionSettings.from_json(data["subscription_settings"]) : ::Pago::UNSET),
      customer_email_settings: (data.key?("customer_email_settings") ? Models::OrganizationCustomerEmailSettings.from_json(data["customer_email_settings"]) : ::Pago::UNSET),
      customer_portal_settings: (data.key?("customer_portal_settings") ? Models::OrganizationCustomerPortalSettings.from_json(data["customer_portal_settings"]) : ::Pago::UNSET),
      country: (data.key?("country") ? data["country"] : ::Pago::UNSET),
      account_id: (data.key?("account_id") ? data["account_id"] : ::Pago::UNSET),
      payout_account_id: (data.key?("payout_account_id") ? data["payout_account_id"] : ::Pago::UNSET),
      capabilities: (data.key?("capabilities") ? Models::OrganizationCapabilities.from_json(data["capabilities"]) : ::Pago::UNSET)
    ),
    data
  )
end