class Stripe::Quote

Overview

A Quote is a way to model prices that you'd like to provide to a customer. Once accepted, it will automatically create an invoice, subscription or subscription schedule.

Included Modules

Defined in:

stripe/models/quote.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 [quote]."
ERROR_MESSAGE_FOR_STATUS = "invalid value for \"status\", must be one of [accepted, canceled, draft, open]."
MAX_LENGTH_FOR_CURRENCY = 5000
MAX_LENGTH_FOR_DESCRIPTION = 5000
MAX_LENGTH_FOR_FOOTER = 5000
MAX_LENGTH_FOR_HEADER = 5000
MAX_LENGTH_FOR_ID = 5000
MAX_LENGTH_FOR_NUMBER = 5000
VALID_VALUES_FOR_COLLECTION_METHOD = String.static_array("charge_automatically", "send_invoice")
VALID_VALUES_FOR_OBJECT = String.static_array("quote")
VALID_VALUES_FOR_STATUS = String.static_array("accepted", "canceled", "draft", "open")

Constructors

Instance Method Summary

Instance methods inherited from module OpenApi::Json

after_initialize after_initialize, clone clone, 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(*, amount_subtotal : Int64 | Nil = nil, amount_total : Int64 | Nil = nil, application : Stripe::QuoteApplication | Nil = nil, application_fee_amount : Int64 | Nil = nil, application_fee_percent : Float64 | Nil = nil, automatic_tax : Stripe::QuotesResourceAutomaticTax | Nil = nil, collection_method : String | Nil = nil, computed : Stripe::QuotesResourceComputed | Nil = nil, created : Int64 | Nil = nil, currency : String | Nil = nil, customer : Stripe::QuoteCustomer | Nil = nil, description : String | Nil = nil, discounts : Array(Stripe::InvoiceitemDiscountsInner) | Nil = nil, expires_at : Int64 | Nil = nil, footer : String | Nil = nil, from_quote : Stripe::QuoteFromQuote | Nil = nil, header : String | Nil = nil, id : String | Nil = nil, invoice : Stripe::QuoteInvoice | Nil = nil, invoice_settings : Stripe::InvoiceSettingQuoteSetting | Nil = nil, livemode : Bool | Nil = nil, metadata : Hash(String, String) | Nil = nil, number : String | Nil = nil, object : String | Nil = nil, on_behalf_of : Stripe::PaymentLinkOnBehalfOf | Nil = nil, status : String | Nil = nil, status_transitions : Stripe::QuotesResourceStatusTransitions | Nil = nil, subscription : Stripe::QuoteSubscription | Nil = nil, subscription_data : Stripe::QuotesResourceSubscriptionDataSubscriptionData | Nil = nil, subscription_schedule : Stripe::QuoteSubscriptionSchedule | Nil = nil, test_clock : Stripe::QuoteTestClock | Nil = nil, total_details : Stripe::QuotesResourceTotalDetails | Nil = nil, transfer_data : Stripe::QuoteTransferData | Nil = nil, default_tax_rates : Array(Stripe::QuoteDefaultTaxRatesInner) | Nil = nil, line_items : Stripe::QuotesResourceListLineItems | Nil = nil) #

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


[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 amount_subtotal : Int64 | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] amount_subtotal Object to be assigned


[View source]
def amount_total : Int64 | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] amount_total Object to be assigned


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

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

Custom attribute writer method checking allowed values (enum). @param [Object] application Object to be assigned


[View source]
def application_fee_amount : Int64 | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] application_fee_amount Object to be assigned


[View source]
def application_fee_percent : Float64 | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] application_fee_percent Object to be assigned


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

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

Custom attribute writer method checking allowed values (enum). @param [Object] automatic_tax Object to be assigned


[View source]
def collection_method : String | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] collection_method Object to be assigned


[View source]
def computed : Stripe::QuotesResourceComputed | Nil #

[View source]
def computed=(new_value : Stripe::QuotesResourceComputed | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] computed Object to be assigned


[View source]
def created : Int64 | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] created Object to be assigned


[View source]
def currency : String | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] currency Object to be assigned


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

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

Custom attribute writer method checking allowed values (enum). @param [Object] customer Object to be assigned


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

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

Custom attribute writer method checking allowed values (enum). @param [Object] default_tax_rates Object to be assigned


[View source]
def description : String | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] description Object to be assigned


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

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

Custom attribute writer method checking allowed values (enum). @param [Object] discounts Object to be assigned


[View source]
def expires_at : Int64 | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] expires_at Object to be assigned


[View source]
def footer : String | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] footer Object to be assigned


[View source]
def from_quote : Stripe::QuoteFromQuote | Nil #

[View source]
def from_quote=(new_value : Stripe::QuoteFromQuote | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] from_quote Object to be assigned


[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 header : String | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] header Object to be assigned


[View source]
def id : String | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] id Object to be assigned


[View source]
def invoice : Stripe::QuoteInvoice | Nil #

[View source]
def invoice=(new_value : Stripe::QuoteInvoice | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] invoice Object to be assigned


[View source]
def invoice_settings : Stripe::InvoiceSettingQuoteSetting | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] invoice_settings Object to be assigned


[View source]
def line_items : Stripe::QuotesResourceListLineItems | Nil #

[View source]
def line_items=(new_value : Stripe::QuotesResourceListLineItems | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] line_items Object to be assigned


[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=(new_value : Bool | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] livemode Object to be assigned


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

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

Custom attribute writer method checking allowed values (enum). @param [Object] metadata Object to be assigned


[View source]
def number : String | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] number Object to be assigned


[View source]
def object : String | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] object Object to be assigned


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

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

Custom attribute writer method checking allowed values (enum). @param [Object] on_behalf_of Object to be assigned


[View source]
def status : String | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] status Object to be assigned


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

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

Custom attribute writer method checking allowed values (enum). @param [Object] status_transitions Object to be assigned


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

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

Custom attribute writer method checking allowed values (enum). @param [Object] subscription Object to be assigned


[View source]

[View source]
def subscription_data=(new_value : Stripe::QuotesResourceSubscriptionDataSubscriptionData | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] subscription_data Object to be assigned


[View source]
def subscription_schedule : Stripe::QuoteSubscriptionSchedule | Nil #

[View source]
def subscription_schedule=(new_value : Stripe::QuoteSubscriptionSchedule | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] subscription_schedule Object to be assigned


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

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

Custom attribute writer method checking allowed values (enum). @param [Object] test_clock Object to be assigned


[View source]
def total_details : Stripe::QuotesResourceTotalDetails | Nil #

[View source]
def total_details=(new_value : Stripe::QuotesResourceTotalDetails | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] total_details Object to be assigned


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

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

Custom attribute writer method checking allowed values (enum). @param [Object] transfer_data Object to be assigned


[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]