Class: HubSpotSDK::Models::Account::APIUsage

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/hubspot_sdk/models/account/api_usage.rb

Defined Under Namespace

Modules: FetchStatus

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(collected_at:, current_usage:, fetch_status:, name:, usage_limit:, resets_at: nil) ⇒ Object

Parameters:

  • collected_at (Time)

    Indicates when the cache was last updated.

  • current_usage (Integer)

    How many API calls an account has made for the current day.

  • fetch_status (Symbol, HubSpotSDK::Models::Account::APIUsage::FetchStatus)

    Status of fetching the information, including if the data came from the cache.

  • name (String)

    Name of the limit type.

  • usage_limit (Integer)

    Limits by which a single integration can consume the HubSpot public APIs.

  • resets_at (Time) (defaults to: nil)

    Time that the limit will reset.



# File 'lib/hubspot_sdk/models/account/api_usage.rb', line 47

Instance Attribute Details

#collected_atTime

Indicates when the cache was last updated.

Returns:

  • (Time)


11
# File 'lib/hubspot_sdk/models/account/api_usage.rb', line 11

required :collected_at, Time, api_name: :collectedAt

#current_usageInteger

How many API calls an account has made for the current day.

Returns:

  • (Integer)


17
# File 'lib/hubspot_sdk/models/account/api_usage.rb', line 17

required :current_usage, Integer, api_name: :currentUsage

#fetch_statusSymbol, HubSpotSDK::Models::Account::APIUsage::FetchStatus

Status of fetching the information, including if the data came from the cache.



23
24
25
26
27
# File 'lib/hubspot_sdk/models/account/api_usage.rb', line 23

required :fetch_status,
enum: -> {
  HubSpotSDK::Account::APIUsage::FetchStatus
},
api_name: :fetchStatus

#nameString

Name of the limit type.

Returns:

  • (String)


33
# File 'lib/hubspot_sdk/models/account/api_usage.rb', line 33

required :name, String

#resets_atTime?

Time that the limit will reset.

Returns:

  • (Time, nil)


45
# File 'lib/hubspot_sdk/models/account/api_usage.rb', line 45

optional :resets_at, Time, api_name: :resetsAt

#usage_limitInteger

Limits by which a single integration can consume the HubSpot public APIs.

Returns:

  • (Integer)


39
# File 'lib/hubspot_sdk/models/account/api_usage.rb', line 39

required :usage_limit, Integer, api_name: :usageLimit