class Stripe::ClimateOrder

Overview

Orders represent your intent to purchase a particular Climate product. When you create an order, the payment is deducted from your merchant balance.

Included Modules

Defined in:

stripe/models/climate_order.cr

Constant Summary

ERROR_MESSAGE_FOR_CANCELLATION_REASON = "invalid value for \"cancellation_reason\", must be one of [expired, product_unavailable, requested]."
ERROR_MESSAGE_FOR_OBJECT = "invalid value for \"object\", must be one of [climate.order]."
ERROR_MESSAGE_FOR_STATUS = "invalid value for \"status\", must be one of [awaiting_funds, canceled, confirmed, delivered, open]."
MAX_LENGTH_FOR_CERTIFICATE = 5000
MAX_LENGTH_FOR_CURRENCY = 5000
MAX_LENGTH_FOR_ID = 5000
VALID_VALUES_FOR_CANCELLATION_REASON = String.static_array("expired", "product_unavailable", "requested")
VALID_VALUES_FOR_OBJECT = String.static_array("climate.order")
VALID_VALUES_FOR_STATUS = String.static_array("awaiting_funds", "canceled", "confirmed", "delivered", "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_fees : Int64 | Nil = nil, amount_subtotal : Int64 | Nil = nil, amount_total : Int64 | Nil = nil, canceled_at : Int64 | Nil = nil, cancellation_reason : String | Nil = nil, certificate : String | Nil = nil, confirmed_at : Int64 | Nil = nil, created : Int64 | Nil = nil, currency : String | Nil = nil, delayed_at : Int64 | Nil = nil, delivered_at : Int64 | Nil = nil, delivery_details : Array(Stripe::ClimateRemovalsOrderDeliveries) | Nil = nil, expected_delivery_year : Int64 | Nil = nil, id : String | Nil = nil, livemode : Bool | Nil = nil, metadata : Hash(String, String) | Nil = nil, metric_tons : BigDecimal | Nil = nil, object : String | Nil = nil, product : Stripe::ClimateOrderProduct | Nil = nil, product_substituted_at : Int64 | Nil = nil, status : String | Nil = nil, beneficiary : Stripe::ClimateRemovalsBeneficiary | 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_fees : Int64 | Nil #

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

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


[View source]
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 beneficiary : Stripe::ClimateRemovalsBeneficiary | Nil #

[View source]
def beneficiary=(new_value : Stripe::ClimateRemovalsBeneficiary | Nil) #

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


[View source]
def canceled_at : Int64 | Nil #

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

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


[View source]
def cancellation_reason : String | Nil #

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

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


[View source]
def certificate : String | Nil #

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

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


[View source]
def confirmed_at : Int64 | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] confirmed_at 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 delayed_at : Int64 | Nil #

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

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


[View source]
def delivered_at : Int64 | Nil #

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

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


[View source]
def delivery_details : Array(Stripe::ClimateRemovalsOrderDeliveries) | Nil #

[View source]
def delivery_details=(new_value : Array(Stripe::ClimateRemovalsOrderDeliveries) | Nil) #

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


[View source]
def expected_delivery_year : Int64 | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] expected_delivery_year 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 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 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 metric_tons : BigDecimal | Nil #

[View source]
def metric_tons=(new_value : BigDecimal | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] metric_tons 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 product : Stripe::ClimateOrderProduct | Nil #

[View source]
def product=(new_value : Stripe::ClimateOrderProduct | Nil) #

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


[View source]
def product_substituted_at : Int64 | Nil #

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

Custom attribute writer method checking allowed values (enum). @param [Object] product_substituted_at 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 valid? : Bool #

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


[View source]