Class: Stigg::Models::V1::ContractRetrieveResponse::Data

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

Overview

See Also:

  • Stigg::Models::V1::ContractRetrieveResponse#data

Defined Under Namespace

Modules: State Classes: LatestInvoice, NextInvoice, Subscription

Instance Attribute Summary collapse

Class Method 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(id:, activation_end_date:, activation_start_date:, billing_id:, contract_id:, created_at:, customer_external_id:, external_id:, latest_invoice:, name:, next_invoice:, po_number:, ref_id:, state:, subscriptions:) ⇒ Object

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

A billing contract as reported by the connected billing provider.

Parameters:

  • id (String, nil)

    The persisted Stigg contract id (matches a subscription’s contractId; present fo

  • activation_end_date (Time, nil)

    The date the contract activation ends

  • activation_start_date (Time, nil)

    The date the contract becomes active

  • billing_id (String, nil)

    The billing provider (Received) contract ID; null until the contract has synced

  • contract_id (String)

    The Stigg contract ref ID (the key used to fetch/update/delete this contract)

  • created_at (Time, nil)

    The date the contract was created

  • customer_external_id (String, nil)

    The external identifier of the customer the contract belongs to

  • external_id (String)

    The external identifier of the contract

  • latest_invoice (Stigg::Models::V1::ContractRetrieveResponse::Data::LatestInvoice, nil)

    The most recent non-draft invoice for this contract (open, paid, or canceled), o

  • name (String, nil)

    The contract name (the purchase-order number when set, otherwise the contract/cu

  • next_invoice (Stigg::Models::V1::ContractRetrieveResponse::Data::NextInvoice, nil)

    A preview of the contract's upcoming invoice, or null when none is available

  • po_number (String, nil)

    Purchase-order number, when set on the contract

  • ref_id (String, nil)

    The Stigg contract ref ID (present for Stigg-managed contracts; the key used to

  • state (Symbol, Stigg::Models::V1::ContractRetrieveResponse::Data::State)

    The current state of the contract

  • subscriptions (Array<Stigg::Models::V1::ContractRetrieveResponse::Data::Subscription>)

    The custom subscriptions attached to this contract (empty when none)



# File 'lib/stigg/models/v1/contract_retrieve_response.rb', line 123

Instance Attribute Details

#activation_end_dateTime?

The date the contract activation ends

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


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

required :activation_end_date, Time, api_name: :activationEndDate, nil?: true

#activation_start_dateTime?

The date the contract becomes active

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


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

required :activation_start_date, Time, api_name: :activationStartDate, nil?: true

#billing_idString?

The billing provider (Received) contract ID; null until the contract has synced to the billing provider

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


45
# File 'lib/stigg/models/v1/contract_retrieve_response.rb', line 45

required :billing_id, String, api_name: :billingId, nil?: true

#contract_idString

The Stigg contract ref ID (the key used to fetch/update/delete this contract)

Parameters:

  • value (String)

Returns:

  • (String)


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

required :contract_id, String, api_name: :contractId

#created_atTime?

The date the contract was created

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


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

required :created_at, Time, api_name: :createdAt, nil?: true

#customer_external_idString?

The external identifier of the customer the contract belongs to

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


63
# File 'lib/stigg/models/v1/contract_retrieve_response.rb', line 63

required :customer_external_id, String, api_name: :customerExternalId, nil?: true

#external_idString

The external identifier of the contract

Parameters:

  • value (String)

Returns:

  • (String)


69
# File 'lib/stigg/models/v1/contract_retrieve_response.rb', line 69

required :external_id, String, api_name: :externalId

#idString?

The persisted Stigg contract id (matches a subscription’s contractId; present for Stigg-managed contracts)

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :id, String, nil?: true

#latest_invoiceStigg::Models::V1::ContractRetrieveResponse::Data::LatestInvoice?

The most recent non-draft invoice for this contract (open, paid, or canceled), or null when none exists



76
77
78
79
# File 'lib/stigg/models/v1/contract_retrieve_response.rb', line 76

required :latest_invoice,
-> { Stigg::Models::V1::ContractRetrieveResponse::Data::LatestInvoice },
api_name: :latestInvoice,
nil?: true

#nameString?

The contract name (the purchase-order number when set, otherwise the contract/customer name)

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


86
# File 'lib/stigg/models/v1/contract_retrieve_response.rb', line 86

required :name, String, nil?: true

#next_invoiceStigg::Models::V1::ContractRetrieveResponse::Data::NextInvoice?

A preview of the contract's upcoming invoice, or null when none is available



92
93
94
95
# File 'lib/stigg/models/v1/contract_retrieve_response.rb', line 92

required :next_invoice,
-> { Stigg::Models::V1::ContractRetrieveResponse::Data::NextInvoice },
api_name: :nextInvoice,
nil?: true

#po_numberString?

Purchase-order number, when set on the contract

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


101
# File 'lib/stigg/models/v1/contract_retrieve_response.rb', line 101

required :po_number, String, api_name: :poNumber, nil?: true

#ref_idString?

The Stigg contract ref ID (present for Stigg-managed contracts; the key used to update/delete)

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


108
# File 'lib/stigg/models/v1/contract_retrieve_response.rb', line 108

required :ref_id, String, api_name: :refId, nil?: true

#stateSymbol, Stigg::Models::V1::ContractRetrieveResponse::Data::State

The current state of the contract

Parameters:

  • value (Stigg::Models::V1::ContractRetrieveResponse::Data::state)

Returns:



114
# File 'lib/stigg/models/v1/contract_retrieve_response.rb', line 114

required :state, enum: -> { Stigg::Models::V1::ContractRetrieveResponse::Data::State }

#subscriptionsArray<Stigg::Models::V1::ContractRetrieveResponse::Data::Subscription>

The custom subscriptions attached to this contract (empty when none)



120
121
# File 'lib/stigg/models/v1/contract_retrieve_response.rb', line 120

required :subscriptions,
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::ContractRetrieveResponse::Data::Subscription] }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/stigg/models/v1/contract_retrieve_response.rb', line 267

Instance Method Details

#to_hash{

Returns:

  • ({)


86
# File 'sig/stigg/models/v1/contract_retrieve_response.rbs', line 86

def to_hash: -> {