Class: WhopSDK::Models::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct
- Defined in:
- lib/whop_sdk/models/invoice_create_params.rb
Defined Under Namespace
Classes: BillingAddress, LineItem, Plan, Product
Instance Attribute Summary collapse
-
#automatically_finalizes_at ⇒ Time?
The date and time when the invoice will be automatically finalized.
-
#billing_address ⇒ WhopSDK::Models::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::BillingAddress?
Inline billing address to create a new mailing address for this invoice.
-
#charge_buyer_fee ⇒ Boolean?
Whether to charge the customer a buyer fee on this invoice.
-
#collection_method ⇒ Symbol, WhopSDK::Models::CollectionMethod
How the invoice should be collected.
-
#company_id ⇒ String
The unique identifier of the company to create this invoice for.
-
#customer_name ⇒ String?
The name of the customer.
-
#due_date ⇒ Time?
The date by which the invoice must be paid.
-
#email_address ⇒ String?
The email address of the customer.
-
#line_items ⇒ Array<WhopSDK::Models::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::LineItem>?
Optional line items that break down the invoice total.
-
#mailing_address_id ⇒ String?
The unique identifier of an existing mailing address to attach to this invoice.
-
#member_id ⇒ String?
The unique identifier of an existing member to create this invoice for.
-
#payment_method_id ⇒ String?
The unique identifier of the payment method to charge.
-
#payment_token_id ⇒ String?
The payment token ID to use for this invoice.
-
#plan ⇒ WhopSDK::Models::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::Plan
The plan attributes defining the price, currency, and billing interval for this invoice.
-
#product ⇒ WhopSDK::Models::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::Product
The properties of the product to create for this invoice.
-
#save_as_draft ⇒ Boolean?
When true, creates the invoice as a draft without sending or charging.
-
#subscription_billing_anchor_at ⇒ Time?
The date that defines when the subscription billing cycle should start.
Instance Method Summary collapse
-
#initialize(city: nil, country: nil, line1: nil, line2: nil, name: nil, phone: nil, postal_code: nil, state: nil, tax_id_type: nil, tax_id_value: nil) ⇒ Object
constructor
Inline billing address to create a new mailing address for this invoice.
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(city: nil, country: nil, line1: nil, line2: nil, name: nil, phone: nil, postal_code: nil, state: nil, tax_id_type: nil, tax_id_value: nil) ⇒ Object
Inline billing address to create a new mailing address for this invoice. Cannot be used together with mailing_address_id.
|
|
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 156
|
Instance Attribute Details
#automatically_finalizes_at ⇒ Time?
The date and time when the invoice will be automatically finalized. For charge_automatically, triggers an automatic charge. For send_invoice, sends the invoice email to the customer at the specified time.
65 |
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 65 optional :automatically_finalizes_at, Time, nil?: true |
#billing_address ⇒ WhopSDK::Models::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::BillingAddress?
Inline billing address to create a new mailing address for this invoice. Cannot be used together with mailing_address_id.
72 73 74 |
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 72 optional :billing_address, -> { WhopSDK::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::BillingAddress }, nil?: true |
#charge_buyer_fee ⇒ Boolean?
Whether to charge the customer a buyer fee on this invoice.
80 |
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 80 optional :charge_buyer_fee, WhopSDK::Internal::Type::Boolean, nil?: true |
#collection_method ⇒ Symbol, WhopSDK::Models::CollectionMethod
How the invoice should be collected. Use charge_automatically to charge a stored payment method, or send_invoice to email the customer.
37 |
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 37 required :collection_method, enum: -> { WhopSDK::CollectionMethod } |
#company_id ⇒ String
The unique identifier of the company to create this invoice for.
43 |
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 43 required :company_id, String |
#customer_name ⇒ String?
The name of the customer. Required when creating an invoice for a customer who is not yet a member of the company.
87 |
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 87 optional :customer_name, String, nil?: true |
#due_date ⇒ Time?
The date by which the invoice must be paid. Required unless save_as_draft is true.
94 |
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 94 optional :due_date, Time, nil?: true |
#email_address ⇒ String?
The email address of the customer. Required when creating an invoice for a customer who is not yet a member of the company.
101 |
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 101 optional :email_address, String, nil?: true |
#line_items ⇒ Array<WhopSDK::Models::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::LineItem>?
Optional line items that break down the invoice total. When provided, the sum of (quantity * unit_price) for all items must equal the plan price.
108 109 110 111 112 |
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 108 optional :line_items, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::LineItem] }, nil?: true |
#mailing_address_id ⇒ String?
The unique identifier of an existing mailing address to attach to this invoice. Cannot be used together with billing_address.
119 |
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 119 optional :mailing_address_id, String, nil?: true |
#member_id ⇒ String?
The unique identifier of an existing member to create this invoice for. If not provided, you must supply an email_address and customer_name.
126 |
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 126 optional :member_id, String, nil?: true |
#payment_method_id ⇒ String?
The unique identifier of the payment method to charge. Required when collection_method is charge_automatically.
133 |
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 133 optional :payment_method_id, String, nil?: true |
#payment_token_id ⇒ String?
The payment token ID to use for this invoice. If using charge_automatically, you must provide a payment_token.
140 |
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 140 optional :payment_token_id, String, nil?: true |
#plan ⇒ WhopSDK::Models::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::Plan
The plan attributes defining the price, currency, and billing interval for this invoice.
50 |
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 50 required :plan, -> { WhopSDK::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::Plan } |
#product ⇒ WhopSDK::Models::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::Product
The properties of the product to create for this invoice. Provide this to create a new product inline.
57 |
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 57 required :product, -> { WhopSDK::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::Product } |
#save_as_draft ⇒ Boolean?
When true, creates the invoice as a draft without sending or charging. Relaxes customer and due date requirements.
147 |
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 147 optional :save_as_draft, WhopSDK::Internal::Type::Boolean, nil?: true |
#subscription_billing_anchor_at ⇒ Time?
The date that defines when the subscription billing cycle should start. When set on a renewal plan invoice, this anchors all future billing periods to this date.
154 |
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 154 optional :subscription_billing_anchor_at, Time, nil?: true |