class Stripe::InvoiceSubscription

Overview

The subscription that this invoice was prepared for, if any.

Included Modules

Defined in:

stripe/models/invoice_subscription.cr

Constant Summary

ERROR_MESSAGE_FOR_COLLECTION_METHOD = "invalid value for \"collection_method\", must be one of [charge_automatically, send_invoice]."
ERROR_MESSAGE_FOR_OBJECT = "invalid value for \"object\", must be one of [subscription]."
ERROR_MESSAGE_FOR_STATUS = "invalid value for \"status\", must be one of [active, canceled, incomplete, incomplete_expired, past_due, paused, trialing, unpaid]."
MAX_LENGTH_FOR_DESCRIPTION = 500
MAX_LENGTH_FOR_ID = 5000
VALID_VALUES_FOR_COLLECTION_METHOD = String.static_array("charge_automatically", "send_invoice")
VALID_VALUES_FOR_OBJECT = String.static_array("subscription")
VALID_VALUES_FOR_STATUS = String.static_array("active", "canceled", "incomplete", "incomplete_expired", "past_due", "paused", "trialing", "unpaid")

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module OpenApi::Json

after_initialize after_initialize, eql?(o : self) eql?, to_hash : Hash(String, JSON::Any) to_hash, to_json_any : JSON::Any to_json_any

Class methods inherited from module OpenApi::Json

build_from_hash(hash : Hash) build_from_hash, build_from_json_any(json_any : JSON::Any) build_from_json_any

Instance methods inherited from module OpenApi::Validatable

list_invalid_properties : Array(String) list_invalid_properties, list_invalid_properties_for(key : String) : Array(String) list_invalid_properties_for, valid? : Bool valid?, validate : Nil validate

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(*, application : Stripe::SubscriptionApplication | Nil = nil, application_fee_percent : Float64 | Nil = nil, automatic_tax : Stripe::SubscriptionAutomaticTax | Nil = nil, billing_cycle_anchor : Int64 | Nil = nil, billing_cycle_anchor_config : Stripe::SubscriptionsResourceBillingCycleAnchorConfig | Nil = nil, billing_thresholds : Stripe::SubscriptionBillingThresholds | Nil = nil, cancel_at : Int64 | Nil = nil, cancel_at_period_end : Bool | Nil = nil, canceled_at : Int64 | Nil = nil, cancellation_details : Stripe::CancellationDetails | Nil = nil, collection_method : String | Nil = nil, created : Int64 | Nil = nil, currency : String | Nil = nil, current_period_end : Int64 | Nil = nil, current_period_start : Int64 | Nil = nil, customer : Stripe::SubscriptionCustomer | Nil = nil, days_until_due : Int64 | Nil = nil, default_payment_method : Stripe::SubscriptionDefaultPaymentMethod | Nil = nil, default_source : Stripe::SubscriptionDefaultSource | Nil = nil, description : String | Nil = nil, discount : Stripe::Discount | Nil = nil, discounts : Array(Stripe::InvoiceitemDiscountsInner) | Nil = nil, ended_at : Int64 | Nil = nil, id : String | Nil = nil, invoice_settings : Stripe::SubscriptionsResourceSubscriptionInvoiceSettings | Nil = nil, items : Stripe::SubscriptionItemList | Nil = nil, latest_invoice : Stripe::SubscriptionLatestInvoice | Nil = nil, livemode : Bool | Nil = nil, metadata : Hash(String, String) | Nil = nil, next_pending_invoice_item_invoice : Int64 | Nil = nil, object : String | Nil = nil, on_behalf_of : Stripe::SubscriptionOnBehalfOf | Nil = nil, pause_collection : Stripe::SubscriptionsResourcePauseCollection | Nil = nil, payment_settings : Stripe::SubscriptionsResourcePaymentSettings | Nil = nil, pending_invoice_item_interval : Stripe::SubscriptionPendingInvoiceItemInterval | Nil = nil, pending_setup_intent : Stripe::SubscriptionPendingSetupIntent | Nil = nil, pending_update : Stripe::SubscriptionsResourcePendingUpdate | Nil = nil, schedule : Stripe::SubscriptionSchedule1 | Nil = nil, start_date : Int64 | Nil = nil, status : String | Nil = nil, test_clock : Stripe::SubscriptionTestClock | Nil = nil, transfer_data : Stripe::SubscriptionTransferData | Nil = nil, trial_end : Int64 | Nil = nil, trial_settings : Stripe::SubscriptionsTrialsResourceTrialSettings | Nil = nil, trial_start : Int64 | Nil = nil, default_tax_rates : Array(Stripe::TaxRate) | Nil = nil) #

Initializes the object @param [Hash] attributes Model attributes in the form of hash


[View source]

Class Method Detail

def self.openapi_any_of #

List of class defined in anyOf (OpenAPI v3)


[View source]

Instance Method Detail

def ==(other : self) #

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code


def application : Stripe::SubscriptionApplication | Nil #

[View source]
def application=(application : Stripe::SubscriptionApplication | Nil) #

[View source]
def application_fee_percent : Float64 | Nil #

[View source]
def application_fee_percent=(application_fee_percent : Float64 | Nil) #

[View source]
def automatic_tax : Stripe::SubscriptionAutomaticTax | Nil #

[View source]
def automatic_tax=(automatic_tax : Stripe::SubscriptionAutomaticTax | Nil) #

[View source]
def billing_cycle_anchor : Int64 | Nil #

[View source]
def billing_cycle_anchor=(billing_cycle_anchor : Int64 | Nil) #

[View source]
def billing_cycle_anchor_config : Stripe::SubscriptionsResourceBillingCycleAnchorConfig | Nil #

[View source]
def billing_cycle_anchor_config=(billing_cycle_anchor_config : Stripe::SubscriptionsResourceBillingCycleAnchorConfig | Nil) #

[View source]
def billing_thresholds : Stripe::SubscriptionBillingThresholds | Nil #

[View source]
def billing_thresholds=(billing_thresholds : Stripe::SubscriptionBillingThresholds | Nil) #

[View source]
def cancel_at : Int64 | Nil #

[View source]
def cancel_at=(cancel_at : Int64 | Nil) #

[View source]
def cancel_at_period_end : Bool | Nil #

[View source]
def cancel_at_period_end=(cancel_at_period_end : Bool | Nil) #

[View source]
def canceled_at : Int64 | Nil #

[View source]
def canceled_at=(canceled_at : Int64 | Nil) #

[View source]
def cancellation_details : Stripe::CancellationDetails | Nil #

[View source]
def cancellation_details=(cancellation_details : Stripe::CancellationDetails | Nil) #

[View source]
def collection_method : String | Nil #

[View source]
def collection_method=(collection_method : String | Nil) #

[View source]
def created : Int64 | Nil #

[View source]
def created=(created : Int64 | Nil) #

[View source]
def currency : String | Nil #

[View source]
def currency=(currency : String | Nil) #

[View source]
def current_period_end : Int64 | Nil #

[View source]
def current_period_end=(current_period_end : Int64 | Nil) #

[View source]
def current_period_start : Int64 | Nil #

[View source]
def current_period_start=(current_period_start : Int64 | Nil) #

[View source]
def customer : Stripe::SubscriptionCustomer | Nil #

[View source]
def customer=(customer : Stripe::SubscriptionCustomer | Nil) #

[View source]
def days_until_due : Int64 | Nil #

[View source]
def days_until_due=(days_until_due : Int64 | Nil) #

[View source]
def default_payment_method : Stripe::SubscriptionDefaultPaymentMethod | Nil #

[View source]
def default_payment_method=(default_payment_method : Stripe::SubscriptionDefaultPaymentMethod | Nil) #

[View source]
def default_source : Stripe::SubscriptionDefaultSource | Nil #

[View source]
def default_source=(default_source : Stripe::SubscriptionDefaultSource | Nil) #

[View source]
def default_tax_rates : Array(Stripe::TaxRate) | Nil #

[View source]
def default_tax_rates=(default_tax_rates : Array(Stripe::TaxRate) | Nil) #

[View source]
def default_tax_rates_present=(default_tax_rates_present : Bool) #

[View source]
def default_tax_rates_present? : Bool #

[View source]
def description : String | Nil #

[View source]
def description=(description : String | Nil) #

[View source]
def discount : Stripe::Discount | Nil #

[View source]
def discount=(discount : Stripe::Discount | Nil) #

[View source]
def discounts : Array(Stripe::InvoiceitemDiscountsInner) | Nil #

[View source]
def discounts=(discounts : Array(Stripe::InvoiceitemDiscountsInner) | Nil) #

[View source]
def ended_at : Int64 | Nil #

[View source]
def ended_at=(ended_at : Int64 | Nil) #

[View source]
def hash(hasher) #

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code


def id : String | Nil #

[View source]
def id=(id : String | Nil) #

[View source]

[View source]
def invoice_settings=(invoice_settings : Stripe::SubscriptionsResourceSubscriptionInvoiceSettings | Nil) #

[View source]
def items : Stripe::SubscriptionItemList | Nil #

[View source]
def items=(items : Stripe::SubscriptionItemList | Nil) #

[View source]
def latest_invoice : Stripe::SubscriptionLatestInvoice | Nil #

[View source]
def latest_invoice=(latest_invoice : Stripe::SubscriptionLatestInvoice | Nil) #

[View source]
def list_invalid_properties : Array(String) #

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons


[View source]
def livemode : Bool | Nil #

[View source]
def livemode=(livemode : Bool | Nil) #

[View source]
def metadata : Hash(String, String) | Nil #

[View source]
def metadata=(metadata : Hash(String, String) | Nil) #

[View source]
def next_pending_invoice_item_invoice : Int64 | Nil #

[View source]
def next_pending_invoice_item_invoice=(next_pending_invoice_item_invoice : Int64 | Nil) #

[View source]
def object : String | Nil #

[View source]
def object=(object : String | Nil) #

[View source]
def on_behalf_of : Stripe::SubscriptionOnBehalfOf | Nil #

[View source]
def on_behalf_of=(on_behalf_of : Stripe::SubscriptionOnBehalfOf | Nil) #

[View source]
def pause_collection : Stripe::SubscriptionsResourcePauseCollection | Nil #

[View source]
def pause_collection=(pause_collection : Stripe::SubscriptionsResourcePauseCollection | Nil) #

[View source]
def payment_settings : Stripe::SubscriptionsResourcePaymentSettings | Nil #

[View source]
def payment_settings=(payment_settings : Stripe::SubscriptionsResourcePaymentSettings | Nil) #

[View source]
def pending_invoice_item_interval : Stripe::SubscriptionPendingInvoiceItemInterval | Nil #

[View source]
def pending_invoice_item_interval=(pending_invoice_item_interval : Stripe::SubscriptionPendingInvoiceItemInterval | Nil) #

[View source]
def pending_setup_intent : Stripe::SubscriptionPendingSetupIntent | Nil #

[View source]
def pending_setup_intent=(pending_setup_intent : Stripe::SubscriptionPendingSetupIntent | Nil) #

[View source]
def pending_update : Stripe::SubscriptionsResourcePendingUpdate | Nil #

[View source]
def pending_update=(pending_update : Stripe::SubscriptionsResourcePendingUpdate | Nil) #

[View source]
def schedule : Stripe::SubscriptionSchedule1 | Nil #

[View source]
def schedule=(schedule : Stripe::SubscriptionSchedule1 | Nil) #

[View source]
def start_date : Int64 | Nil #

[View source]
def start_date=(start_date : Int64 | Nil) #

[View source]
def status : String | Nil #

[View source]
def status=(status : String | Nil) #

[View source]
def test_clock : Stripe::SubscriptionTestClock | Nil #

[View source]
def test_clock=(test_clock : Stripe::SubscriptionTestClock | Nil) #

[View source]
def transfer_data : Stripe::SubscriptionTransferData | Nil #

[View source]
def transfer_data=(transfer_data : Stripe::SubscriptionTransferData | Nil) #

[View source]
def trial_end : Int64 | Nil #

[View source]
def trial_end=(trial_end : Int64 | Nil) #

[View source]

[View source]
def trial_settings=(trial_settings : Stripe::SubscriptionsTrialsResourceTrialSettings | Nil) #

[View source]
def trial_start : Int64 | Nil #

[View source]
def trial_start=(trial_start : Int64 | Nil) #

[View source]
def valid? : Bool #

Check to see if the all the properties in the model are valid @return true if the model is valid


[View source]