Class: Stigg::Models::V1::Credits::ConsumptionConsumeResponse::Data

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/stigg/models/v1/credits/consumption_consume_response.rb,
sig/stigg/models/v1/credits/consumption_consume_response.rbs

Overview

See Also:

  • Stigg::Models::V1::Credits::ConsumptionConsumeResponse#data

Defined Under Namespace

Classes: Credit

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(amount:, currency_id:, customer_id:, timestamp:, credit: nil, resource_id: nil) ⇒ Object

Some parameter documentations has been truncated, see Stigg::Models::V1::Credits::ConsumptionConsumeResponse::Data for more details.

Result of a synchronous direct credit consumption

Parameters:

  • amount (Float)

    The amount of credits consumed

  • currency_id (String)

    The credit currency the credits were consumed from

  • customer_id (String)

    The customer the credits were consumed from

  • timestamp (Time)

    The timestamp the consumption was attributed to

  • credit (Stigg::Models::V1::Credits::ConsumptionConsumeResponse::Data::Credit, nil) (defaults to: nil)

    The optimistic credit balance after consumption (when sync credit consumption is

  • resource_id (String, nil) (defaults to: nil)

    The resource the consumption was attributed to



# File 'lib/stigg/models/v1/credits/consumption_consume_response.rb', line 59

Instance Attribute Details

#amountFloat

The amount of credits consumed

Parameters:

  • value (Float)

Returns:

  • (Float)


26
# File 'lib/stigg/models/v1/credits/consumption_consume_response.rb', line 26

required :amount, Float

#creditStigg::Models::V1::Credits::ConsumptionConsumeResponse::Data::Credit?

The optimistic credit balance after consumption (when sync credit consumption is enabled)



51
# File 'lib/stigg/models/v1/credits/consumption_consume_response.rb', line 51

optional :credit, -> { Stigg::Models::V1::Credits::ConsumptionConsumeResponse::Data::Credit }, nil?: true

#currency_idString

The credit currency the credits were consumed from

Parameters:

  • value (String)

Returns:

  • (String)


32
# File 'lib/stigg/models/v1/credits/consumption_consume_response.rb', line 32

required :currency_id, String, api_name: :currencyId

#customer_idString

The customer the credits were consumed from

Parameters:

  • value (String)

Returns:

  • (String)


38
# File 'lib/stigg/models/v1/credits/consumption_consume_response.rb', line 38

required :customer_id, String, api_name: :customerId

#resource_idString?

The resource the consumption was attributed to

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


57
# File 'lib/stigg/models/v1/credits/consumption_consume_response.rb', line 57

optional :resource_id, String, api_name: :resourceId, nil?: true

#timestampTime

The timestamp the consumption was attributed to

Parameters:

  • value (Time)

Returns:

  • (Time)


44
# File 'lib/stigg/models/v1/credits/consumption_consume_response.rb', line 44

required :timestamp, Time

Instance Method Details

#to_hash{

Returns:

  • ({)


51
# File 'sig/stigg/models/v1/credits/consumption_consume_response.rbs', line 51

def to_hash: -> {