Class: ApolloDeploySignalSdkRails::ProjectLimitsModel

Inherits:
Object
  • Object
show all
Defined in:
lib/apollo_deploy_signal_sdk_rails/types.rb

Overview

Schema type: ProjectLimitsModel

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(daily_sends:, per_second_sends:, max_recipients_per_message:, max_domains:, max_api_keys:, max_webhooks:) ⇒ ProjectLimitsModel

Returns a new instance of ProjectLimitsModel.

Parameters:

  • daily_sends (Integer)

    , per_second_sends [Integer], max_recipients_per_message [Integer], max_domains [Integer], max_api_keys [Integer], max_webhooks [Integer]



3945
3946
3947
3948
3949
3950
3951
3952
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3945

def initialize(daily_sends: , per_second_sends: , max_recipients_per_message: , max_domains: , max_api_keys: , max_webhooks: )
  @daily_sends = daily_sends
  @per_second_sends = per_second_sends
  @max_recipients_per_message = max_recipients_per_message
  @max_domains = max_domains
  @max_api_keys = max_api_keys
  @max_webhooks = max_webhooks
end

Instance Attribute Details

#daily_sendsInteger

Returns:

  • (Integer)


3932
3933
3934
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3932

def daily_sends
  @daily_sends
end

#max_api_keysInteger

Returns:

  • (Integer)


3940
3941
3942
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3940

def max_api_keys
  @max_api_keys
end

#max_domainsInteger

Returns:

  • (Integer)


3938
3939
3940
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3938

def max_domains
  @max_domains
end

#max_recipients_per_messageInteger

Returns:

  • (Integer)


3936
3937
3938
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3936

def max_recipients_per_message
  @max_recipients_per_message
end

#max_webhooksInteger

Returns:

  • (Integer)


3942
3943
3944
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3942

def max_webhooks
  @max_webhooks
end

#per_second_sendsInteger

Returns:

  • (Integer)


3934
3935
3936
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3934

def per_second_sends
  @per_second_sends
end

Class Method Details

.from_json(attributes) ⇒ ProjectLimitsModel

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3969

def self.from_json(attributes)
  return nil unless attributes.is_a?(Hash)

  new(
    daily_sends: attributes.key?("dailySends") ? attributes["dailySends"] : attributes[:daily_sends],
    per_second_sends: attributes.key?("perSecondSends") ? attributes["perSecondSends"] : attributes[:per_second_sends],
    max_recipients_per_message: attributes.key?("maxRecipientsPerMessage") ? attributes["maxRecipientsPerMessage"] : attributes[:max_recipients_per_message],
    max_domains: attributes.key?("maxDomains") ? attributes["maxDomains"] : attributes[:max_domains],
    max_api_keys: attributes.key?("maxApiKeys") ? attributes["maxApiKeys"] : attributes[:max_api_keys],
    max_webhooks: attributes.key?("maxWebhooks") ? attributes["maxWebhooks"] : attributes[:max_webhooks],
  )
end

Instance Method Details

#to_hHash

Returns a hash representation of this object.

Returns:

  • (Hash)

    a hash representation of this object



3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3955

def to_h
  {
    daily_sends: @daily_sends,
    per_second_sends: @per_second_sends,
    max_recipients_per_message: @max_recipients_per_message,
    max_domains: @max_domains,
    max_api_keys: @max_api_keys,
    max_webhooks: @max_webhooks,
  }.compact
end