Class: WhopSDK::Models::Invoice

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/invoice.rb

Defined Under Namespace

Classes: CurrentPlan, User

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(id: , currency: , formatted_price: ) ⇒ Object

The plan that the invoice was created for.

Parameters:

  • id (String) (defaults to: )

    The internal ID of the plan.

  • currency (Symbol, WhopSDK::Models::Currency) (defaults to: )

    The respective currency identifier for the plan.

  • formatted_price (String) (defaults to: )

    The formatted price (including currency) for the plan.



# File 'lib/whop_sdk/models/invoice.rb', line 61

Instance Attribute Details

#created_atTime

The date the invoice was created.

Returns:

  • (Time)


16
# File 'lib/whop_sdk/models/invoice.rb', line 16

required :created_at, Time

#current_planWhopSDK::Models::Invoice::CurrentPlan

The plan that the invoice was created for.



22
# File 'lib/whop_sdk/models/invoice.rb', line 22

required :current_plan, -> { WhopSDK::Invoice::CurrentPlan }

#due_dateTime?

The date the invoice is due.

Returns:

  • (Time, nil)


28
# File 'lib/whop_sdk/models/invoice.rb', line 28

required :due_date, Time, nil?: true

#email_addressString?

The email address that the invoice was created for.

Returns:

  • (String, nil)


34
# File 'lib/whop_sdk/models/invoice.rb', line 34

required :email_address, String, nil?: true

#fetch_invoice_tokenString

A signed token that allows fetching the invoice data publically without being authenticated.

Returns:

  • (String)


41
# File 'lib/whop_sdk/models/invoice.rb', line 41

required :fetch_invoice_token, String

#idString

The ID of the invoice.

Returns:

  • (String)


10
# File 'lib/whop_sdk/models/invoice.rb', line 10

required :id, String

#numberString

The number of the invoice.

Returns:

  • (String)


47
# File 'lib/whop_sdk/models/invoice.rb', line 47

required :number, String

#statusSymbol, WhopSDK::Models::InvoiceStatus

The status of the invoice.

Returns:



53
# File 'lib/whop_sdk/models/invoice.rb', line 53

required :status, enum: -> { WhopSDK::InvoiceStatus }

#userWhopSDK::Models::Invoice::User?

The user that the invoice was created for.



59
# File 'lib/whop_sdk/models/invoice.rb', line 59

required :user, -> { WhopSDK::Invoice::User }, nil?: true