class Stripe::PostCreditNotesRequest
- Stripe::PostCreditNotesRequest
- Reference
- Object
Included Modules
- JSON::Serializable
- JSON::Serializable::Unmapped
- OpenApi::Json
- OpenApi::Validatable
Defined in:
stripe/models/post_credit_notes_request.crConstant 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
- .new(pull : JSON::PullParser)
-
.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
Instance Method Summary
-
#==(other : self)
Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes.
- #amount : Int64 | Nil
-
#amount=(new_value : Int64 | Nil)
Custom attribute writer method checking allowed values (enum).
- #credit_amount : Int64 | Nil
-
#credit_amount=(new_value : Int64 | Nil)
Custom attribute writer method checking allowed values (enum).
- #effective_at : Int64 | Nil
-
#effective_at=(new_value : Int64 | Nil)
Custom attribute writer method checking allowed values (enum).
- #email_type : String | Nil
-
#email_type=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #expand : Array(String) | Nil
-
#expand=(new_value : Array(String) | Nil)
Custom attribute writer method checking allowed values (enum).
-
#hash(hasher)
Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes.
- #invoice : String | Nil
-
#invoice=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #lines : Array(Stripe::CreditNoteLineItemParams) | Nil
-
#lines=(new_value : Array(Stripe::CreditNoteLineItemParams) | Nil)
Custom attribute writer method checking allowed values (enum).
-
#list_invalid_properties : Array(String)
Show invalid properties with the reasons.
- #memo : String | Nil
-
#memo=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #metadata : Hash(String, String) | Nil
-
#metadata=(new_value : Hash(String, String) | Nil)
Custom attribute writer method checking allowed values (enum).
- #out_of_band_amount : Int64 | Nil
-
#out_of_band_amount=(new_value : Int64 | Nil)
Custom attribute writer method checking allowed values (enum).
- #reason : String | Nil
-
#reason=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #refund : String | Nil
-
#refund=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #refund_amount : Int64 | Nil
-
#refund_amount=(new_value : Int64 | Nil)
Custom attribute writer method checking allowed values (enum).
- #shipping_cost : Stripe::CreditNoteShippingCost | Nil
-
#shipping_cost=(new_value : Stripe::CreditNoteShippingCost | Nil)
Custom attribute writer method checking allowed values (enum).
-
#valid? : Bool
Check to see if the all the properties in the model are valid @return true if the model is valid
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
Initializes the object @param [Hash] attributes Model attributes in the form of hash
Instance Method Detail
Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code
Custom attribute writer method checking allowed values (enum). @param [Object] amount Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] credit_amount Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] effective_at Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] email_type Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] expand Object to be assigned
Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code
Custom attribute writer method checking allowed values (enum). @param [Object] invoice Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] lines Object to be assigned
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
Custom attribute writer method checking allowed values (enum). @param [Object] memo Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] metadata Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] out_of_band_amount Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] reason Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] refund Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] refund_amount Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] shipping_cost Object to be assigned
Check to see if the all the properties in the model are valid @return true if the model is valid