class Stripe::InvoiceLatestRevision

Overview

The ID of the most recent non-draft revision of this invoice

Included Modules

Defined in:

stripe/models/invoice_latest_revision.cr

Constant Summary

ERROR_MESSAGE_FOR_BILLING_REASON = "invalid value for \"billing_reason\", must be one of [automatic_pending_invoice_item_invoice, manual, quote_accept, subscription, subscription_create, subscription_cycle, subscription_threshold, subscription_update, upcoming]."
ERROR_MESSAGE_FOR_COLLECTION_METHOD = "invalid value for \"collection_method\", must be one of [charge_automatically, send_invoice]."
ERROR_MESSAGE_FOR_CUSTOMER_TAX_EXEMPT = "invalid value for \"customer_tax_exempt\", must be one of [exempt, none, reverse]."
ERROR_MESSAGE_FOR_OBJECT = "invalid value for \"object\", must be one of [invoice]."
ERROR_MESSAGE_FOR_STATUS = "invalid value for \"status\", must be one of [draft, open, paid, uncollectible, void]."
MAX_LENGTH_FOR_ACCOUNT_COUNTRY = 5000
MAX_LENGTH_FOR_ACCOUNT_NAME = 5000
MAX_LENGTH_FOR_CUSTOMER_EMAIL = 5000
MAX_LENGTH_FOR_CUSTOMER_NAME = 5000
MAX_LENGTH_FOR_CUSTOMER_PHONE = 5000
MAX_LENGTH_FOR_DESCRIPTION = 5000
MAX_LENGTH_FOR_FOOTER = 5000
MAX_LENGTH_FOR_HOSTED_INVOICE_URL = 5000
MAX_LENGTH_FOR_ID = 5000
MAX_LENGTH_FOR_INVOICE_PDF = 5000
MAX_LENGTH_FOR_NUMBER = 5000
MAX_LENGTH_FOR_RECEIPT_NUMBER = 5000
MAX_LENGTH_FOR_STATEMENT_DESCRIPTOR = 5000
VALID_VALUES_FOR_BILLING_REASON = String.static_array("automatic_pending_invoice_item_invoice", "manual", "quote_accept", "subscription", "subscription_create", "subscription_cycle", "subscription_threshold", "subscription_update", "upcoming")
VALID_VALUES_FOR_COLLECTION_METHOD = String.static_array("charge_automatically", "send_invoice")
VALID_VALUES_FOR_CUSTOMER_TAX_EXEMPT = String.static_array("exempt", "none", "reverse")
VALID_VALUES_FOR_OBJECT = String.static_array("invoice")
VALID_VALUES_FOR_STATUS = String.static_array("draft", "open", "paid", "uncollectible", "void")

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(*, account_country : String | Nil = nil, account_name : String | Nil = nil, account_tax_ids : Array(Stripe::InvoiceAccountTaxIdsInner) | Nil = nil, amount_due : Int64 | Nil = nil, amount_paid : Int64 | Nil = nil, amount_remaining : Int64 | Nil = nil, amount_shipping : Int64 | Nil = nil, application : Stripe::InvoiceApplication | Nil = nil, application_fee_amount : Int64 | Nil = nil, attempt_count : Int64 | Nil = nil, attempted : Bool | Nil = nil, automatic_tax : Stripe::AutomaticTax | Nil = nil, billing_reason : String | Nil = nil, charge : Stripe::InvoiceCharge | Nil = nil, collection_method : String | Nil = nil, created : Int64 | Nil = nil, currency : String | Nil = nil, custom_fields : Array(Stripe::InvoiceSettingCustomField) | Nil = nil, customer : Stripe::InvoiceCustomer | Nil = nil, customer_address : Stripe::Address | Nil = nil, customer_email : String | Nil = nil, customer_name : String | Nil = nil, customer_phone : String | Nil = nil, customer_shipping : Stripe::Shipping | Nil = nil, customer_tax_exempt : String | Nil = nil, default_payment_method : Stripe::InvoiceDefaultPaymentMethod | Nil = nil, default_source : Stripe::InvoiceDefaultSource | Nil = nil, default_tax_rates : Array(Stripe::TaxRate) | Nil = nil, description : String | Nil = nil, discount : Stripe::Discount | Nil = nil, discounts : Array(Stripe::InvoiceDiscountsInner) | Nil = nil, due_date : Int64 | Nil = nil, effective_at : Int64 | Nil = nil, ending_balance : Int64 | Nil = nil, footer : String | Nil = nil, from_invoice : Stripe::InvoicesResourceFromInvoice | Nil = nil, issuer : Stripe::ConnectAccountReference | Nil = nil, last_finalization_error : Stripe::ApiErrors | Nil = nil, latest_revision : Stripe::InvoiceLatestRevision | Nil = nil, lines : Stripe::InvoiceLinesList | Nil = nil, livemode : Bool | Nil = nil, metadata : Hash(String, String) | Nil = nil, next_payment_attempt : Int64 | Nil = nil, number : String | Nil = nil, object : String | Nil = nil, on_behalf_of : Stripe::InvoiceOnBehalfOf | Nil = nil, paid : Bool | Nil = nil, paid_out_of_band : Bool | Nil = nil, payment_intent : Stripe::InvoicePaymentIntent | Nil = nil, payment_settings : Stripe::InvoicesPaymentSettings | Nil = nil, period_end : Int64 | Nil = nil, period_start : Int64 | Nil = nil, post_payment_credit_notes_amount : Int64 | Nil = nil, pre_payment_credit_notes_amount : Int64 | Nil = nil, quote : Stripe::InvoiceQuote | Nil = nil, receipt_number : String | Nil = nil, rendering : Stripe::InvoicesResourceInvoiceRendering | Nil = nil, shipping_cost : Stripe::InvoicesResourceShippingCost | Nil = nil, shipping_details : Stripe::Shipping | Nil = nil, starting_balance : Int64 | Nil = nil, statement_descriptor : String | Nil = nil, status : String | Nil = nil, status_transitions : Stripe::InvoicesResourceStatusTransitions | Nil = nil, subscription : Stripe::InvoiceSubscription | Nil = nil, subscription_details : Stripe::SubscriptionDetailsData | Nil = nil, subtotal : Int64 | Nil = nil, subtotal_excluding_tax : Int64 | Nil = nil, tax : Int64 | Nil = nil, test_clock : Stripe::InvoiceTestClock | Nil = nil, total : Int64 | Nil = nil, total_discount_amounts : Array(Stripe::DiscountsResourceDiscountAmount) | Nil = nil, total_excluding_tax : Int64 | Nil = nil, total_tax_amounts : Array(Stripe::InvoiceTaxAmount) | Nil = nil, transfer_data : Stripe::InvoiceTransferData | Nil = nil, webhooks_delivered_at : Int64 | Nil = nil, auto_advance : Bool | Nil = nil, customer_tax_ids : Array(Stripe::InvoicesResourceInvoiceTaxId) | Nil = nil, hosted_invoice_url : String | Nil = nil, id : String | Nil = nil, invoice_pdf : String | Nil = nil, subscription_proration_date : Int64 | Nil = nil, threshold_reason : Stripe::InvoiceThresholdReason | 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 account_country : String | Nil #

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

[View source]
def account_name : String | Nil #

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

[View source]
def account_tax_ids : Array(Stripe::InvoiceAccountTaxIdsInner) | Nil #

[View source]
def account_tax_ids=(account_tax_ids : Array(Stripe::InvoiceAccountTaxIdsInner) | Nil) #

[View source]
def amount_due : Int64 | Nil #

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

[View source]
def amount_paid : Int64 | Nil #

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

[View source]
def amount_remaining : Int64 | Nil #

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

[View source]
def amount_shipping : Int64 | Nil #

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

[View source]
def application : Stripe::InvoiceApplication | Nil #

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

[View source]
def application_fee_amount : Int64 | Nil #

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

[View source]
def attempt_count : Int64 | Nil #

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

[View source]
def attempted : Bool | Nil #

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

[View source]
def auto_advance : Bool | Nil #

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

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

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

[View source]
def billing_reason : String | Nil #

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

[View source]
def charge : Stripe::InvoiceCharge | Nil #

[View source]
def charge=(charge : Stripe::InvoiceCharge | 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 custom_fields : Array(Stripe::InvoiceSettingCustomField) | Nil #

[View source]
def custom_fields=(custom_fields : Array(Stripe::InvoiceSettingCustomField) | Nil) #

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

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

[View source]
def customer_address : Stripe::Address | Nil #

[View source]
def customer_address=(customer_address : Stripe::Address | Nil) #

[View source]
def customer_email : String | Nil #

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

[View source]
def customer_name : String | Nil #

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

[View source]
def customer_phone : String | Nil #

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

[View source]
def customer_shipping : Stripe::Shipping | Nil #

[View source]
def customer_shipping=(customer_shipping : Stripe::Shipping | Nil) #

[View source]
def customer_tax_exempt : String | Nil #

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

[View source]
def customer_tax_ids : Array(Stripe::InvoicesResourceInvoiceTaxId) | Nil #

[View source]
def customer_tax_ids=(customer_tax_ids : Array(Stripe::InvoicesResourceInvoiceTaxId) | Nil) #

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

[View source]
def customer_tax_ids_present? : Bool #

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

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

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

[View source]
def default_source=(default_source : Stripe::InvoiceDefaultSource | 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 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::InvoiceDiscountsInner) | Nil #

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

[View source]
def due_date : Int64 | Nil #

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

[View source]
def effective_at : Int64 | Nil #

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

[View source]
def ending_balance : Int64 | Nil #

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

[View source]
def footer : String | Nil #

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

[View source]
def from_invoice : Stripe::InvoicesResourceFromInvoice | Nil #

[View source]
def from_invoice=(from_invoice : Stripe::InvoicesResourceFromInvoice | 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 hosted_invoice_url : String | Nil #

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

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

[View source]
def hosted_invoice_url_present? : Bool #

[View source]
def id : String | Nil #

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

[View source]
def invoice_pdf : String | Nil #

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

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

[View source]
def invoice_pdf_present? : Bool #

[View source]
def issuer : Stripe::ConnectAccountReference | Nil #

[View source]
def issuer=(issuer : Stripe::ConnectAccountReference | Nil) #

[View source]
def last_finalization_error : Stripe::ApiErrors | Nil #

[View source]
def last_finalization_error=(last_finalization_error : Stripe::ApiErrors | Nil) #

[View source]
def latest_revision : Stripe::InvoiceLatestRevision | Nil #

[View source]
def latest_revision=(latest_revision : Stripe::InvoiceLatestRevision | Nil) #

[View source]
def lines : Stripe::InvoiceLinesList | Nil #

[View source]
def lines=(lines : Stripe::InvoiceLinesList | 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_payment_attempt : Int64 | Nil #

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

[View source]
def number : String | Nil #

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

[View source]
def object : String | Nil #

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

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

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

[View source]
def paid : Bool | Nil #

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

[View source]
def payment_intent : Stripe::InvoicePaymentIntent | Nil #

[View source]
def payment_intent=(payment_intent : Stripe::InvoicePaymentIntent | Nil) #

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

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

[View source]
def period_end : Int64 | Nil #

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

[View source]
def period_start : Int64 | Nil #

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

[View source]
def post_payment_credit_notes_amount : Int64 | Nil #

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

[View source]
def pre_payment_credit_notes_amount : Int64 | Nil #

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

[View source]
def quote : Stripe::InvoiceQuote | Nil #

[View source]
def quote=(quote : Stripe::InvoiceQuote | Nil) #

[View source]
def receipt_number : String | Nil #

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

[View source]

[View source]
def rendering=(rendering : Stripe::InvoicesResourceInvoiceRendering | Nil) #

[View source]
def shipping_cost : Stripe::InvoicesResourceShippingCost | Nil #

[View source]
def shipping_cost=(shipping_cost : Stripe::InvoicesResourceShippingCost | Nil) #

[View source]
def shipping_details : Stripe::Shipping | Nil #

[View source]
def shipping_details=(shipping_details : Stripe::Shipping | Nil) #

[View source]
def starting_balance : Int64 | Nil #

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

[View source]
def statement_descriptor : String | Nil #

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

[View source]
def status : String | Nil #

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

[View source]
def status_transitions : Stripe::InvoicesResourceStatusTransitions | Nil #

[View source]
def status_transitions=(status_transitions : Stripe::InvoicesResourceStatusTransitions | Nil) #

[View source]
def subscription : Stripe::InvoiceSubscription | Nil #

[View source]
def subscription=(subscription : Stripe::InvoiceSubscription | Nil) #

[View source]
def subscription_details : Stripe::SubscriptionDetailsData | Nil #

[View source]
def subscription_details=(subscription_details : Stripe::SubscriptionDetailsData | Nil) #

[View source]
def subscription_proration_date : Int64 | Nil #

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

[View source]
def subtotal : Int64 | Nil #

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

[View source]
def subtotal_excluding_tax : Int64 | Nil #

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

[View source]
def tax : Int64 | Nil #

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

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

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

[View source]
def threshold_reason : Stripe::InvoiceThresholdReason | Nil #

[View source]
def threshold_reason=(threshold_reason : Stripe::InvoiceThresholdReason | Nil) #

[View source]
def total : Int64 | Nil #

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

[View source]
def total_discount_amounts : Array(Stripe::DiscountsResourceDiscountAmount) | Nil #

[View source]
def total_discount_amounts=(total_discount_amounts : Array(Stripe::DiscountsResourceDiscountAmount) | Nil) #

[View source]
def total_excluding_tax : Int64 | Nil #

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

[View source]
def total_tax_amounts : Array(Stripe::InvoiceTaxAmount) | Nil #

[View source]
def total_tax_amounts=(total_tax_amounts : Array(Stripe::InvoiceTaxAmount) | Nil) #

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

[View source]
def transfer_data=(transfer_data : Stripe::InvoiceTransferData | 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]
def webhooks_delivered_at : Int64 | Nil #

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

[View source]