class Stripe::PostCreditNotesRequest

Included Modules

Defined in:

stripe/models/post_credit_notes_request.cr

Constant Summary

ERROR_MESSAGE_FOR_EMAIL_TYPE = "invalid value for \"email_type\", must be one of [credit_note, none]."
ERROR_MESSAGE_FOR_REASON = "invalid value for \"reason\", must be one of [duplicate, fraudulent, order_change, product_unsatisfactory]."
MAX_LENGTH_FOR_INVOICE = 5000
MAX_LENGTH_FOR_MEMO = 5000
VALID_VALUES_FOR_EMAIL_TYPE = String.static_array("credit_note", "none")
VALID_VALUES_FOR_REASON = String.static_array("duplicate", "fraudulent", "order_change", "product_unsatisfactory")

Constructors

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(*, invoice : String | Nil = nil, amount : Int64 | Nil = nil, credit_amount : Int64 | Nil = nil, effective_at : Int64 | Nil = nil, email_type : String | Nil = nil, expand : Array(String) | Nil = nil, lines : Array(Stripe::CreditNoteLineItemParams) | Nil = nil, memo : String | Nil = nil, metadata : Hash(String, String) | Nil = nil, out_of_band_amount : Int64 | Nil = nil, reason : String | Nil = nil, refund : String | Nil = nil, refund_amount : Int64 | Nil = nil, shipping_cost : Stripe::CreditNoteShippingCost | 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 : Int64 | Nil #

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

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


[View source]
def credit_amount : Int64 | Nil #

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

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


[View source]
def effective_at : Int64 | Nil #

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

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


[View source]
def email_type : String | Nil #

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

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


[View source]
def expand : Array(String) | Nil #

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

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

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

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


[View source]
def lines : Array(Stripe::CreditNoteLineItemParams) | Nil #

[View source]
def lines=(new_value : Array(Stripe::CreditNoteLineItemParams) | Nil) #

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

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

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

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

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


[View source]
def reason : String | Nil #

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

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


[View source]
def refund : String | Nil #

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

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


[View source]
def refund_amount : Int64 | Nil #

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

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


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

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

Custom attribute writer method checking allowed values (enum). @param [Object] shipping_cost 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]