Class: UltracartClient::ChargebackDispute
- Inherits:
-
Object
- Object
- UltracartClient::ChargebackDispute
- Defined in:
- lib/ultracart_api/models/chargeback_dispute.rb
Instance Attribute Summary collapse
-
#account_number ⇒ Object
Account number.
-
#adjustment_request_text ⇒ Object
Adjustment request text.
-
#amount ⇒ Object
Amount.
-
#auth_code ⇒ Object
Auth code.
-
#case_number ⇒ Object
Case number.
-
#chargeback_dispute_oid ⇒ Object
Chargeback Dispute Oid.
-
#chargeback_dts ⇒ Object
Chargeback dts.
-
#currency ⇒ Object
Currency.
-
#customer_care_notes ⇒ Object
Customer care notes.
-
#encryption_key ⇒ Object
Encryption key.
-
#expiration_dts ⇒ Object
Expiration Dts.
-
#fax_failure_reason ⇒ Object
Fax failure reason.
-
#fax_number ⇒ Object
Fax number.
-
#fax_transaction_id ⇒ Object
Fax transaction id.
-
#icsid ⇒ Object
icsid.
-
#merchant_account_profile_oid ⇒ Object
Merchant account profile oid.
-
#order ⇒ Object
Returns the value of attribute order.
-
#order_id ⇒ Object
Order Id.
-
#partial_card_number ⇒ Object
Partial card number.
-
#pdf_file_oid ⇒ Object
PDF file oid.
-
#reason_code ⇒ Object
Reason code.
-
#status ⇒ Object
Status.
-
#website_url ⇒ Object
Website URL.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ChargebackDispute
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ ChargebackDispute
Initializes the object
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 157 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ChargebackDispute` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ChargebackDispute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'account_number') self.account_number = attributes[:'account_number'] end if attributes.key?(:'adjustment_request_text') self.adjustment_request_text = attributes[:'adjustment_request_text'] end if attributes.key?(:'amount') self.amount = attributes[:'amount'] end if attributes.key?(:'auth_code') self.auth_code = attributes[:'auth_code'] end if attributes.key?(:'case_number') self.case_number = attributes[:'case_number'] end if attributes.key?(:'chargeback_dispute_oid') self.chargeback_dispute_oid = attributes[:'chargeback_dispute_oid'] end if attributes.key?(:'chargeback_dts') self.chargeback_dts = attributes[:'chargeback_dts'] end if attributes.key?(:'currency') self.currency = attributes[:'currency'] end if attributes.key?(:'customer_care_notes') self.customer_care_notes = attributes[:'customer_care_notes'] end if attributes.key?(:'encryption_key') self.encryption_key = attributes[:'encryption_key'] end if attributes.key?(:'expiration_dts') self.expiration_dts = attributes[:'expiration_dts'] end if attributes.key?(:'fax_failure_reason') self.fax_failure_reason = attributes[:'fax_failure_reason'] end if attributes.key?(:'fax_number') self.fax_number = attributes[:'fax_number'] end if attributes.key?(:'fax_transaction_id') self.fax_transaction_id = attributes[:'fax_transaction_id'] end if attributes.key?(:'icsid') self.icsid = attributes[:'icsid'] end if attributes.key?(:'merchant_account_profile_oid') self.merchant_account_profile_oid = attributes[:'merchant_account_profile_oid'] end if attributes.key?(:'order') self.order = attributes[:'order'] end if attributes.key?(:'order_id') self.order_id = attributes[:'order_id'] end if attributes.key?(:'partial_card_number') self.partial_card_number = attributes[:'partial_card_number'] end if attributes.key?(:'pdf_file_oid') self.pdf_file_oid = attributes[:'pdf_file_oid'] end if attributes.key?(:'reason_code') self.reason_code = attributes[:'reason_code'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'website_url') self.website_url = attributes[:'website_url'] end end |
Instance Attribute Details
#account_number ⇒ Object
Account number
19 20 21 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 19 def account_number @account_number end |
#adjustment_request_text ⇒ Object
Adjustment request text
22 23 24 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 22 def adjustment_request_text @adjustment_request_text end |
#amount ⇒ Object
Amount
25 26 27 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 25 def amount @amount end |
#auth_code ⇒ Object
Auth code
28 29 30 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 28 def auth_code @auth_code end |
#case_number ⇒ Object
Case number
31 32 33 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 31 def case_number @case_number end |
#chargeback_dispute_oid ⇒ Object
Chargeback Dispute Oid
34 35 36 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 34 def chargeback_dispute_oid @chargeback_dispute_oid end |
#chargeback_dts ⇒ Object
Chargeback dts
37 38 39 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 37 def chargeback_dts @chargeback_dts end |
#currency ⇒ Object
Currency
40 41 42 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 40 def currency @currency end |
#customer_care_notes ⇒ Object
Customer care notes
43 44 45 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 43 def customer_care_notes @customer_care_notes end |
#encryption_key ⇒ Object
Encryption key
46 47 48 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 46 def encryption_key @encryption_key end |
#expiration_dts ⇒ Object
Expiration Dts
49 50 51 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 49 def expiration_dts @expiration_dts end |
#fax_failure_reason ⇒ Object
Fax failure reason
52 53 54 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 52 def fax_failure_reason @fax_failure_reason end |
#fax_number ⇒ Object
Fax number
55 56 57 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 55 def fax_number @fax_number end |
#fax_transaction_id ⇒ Object
Fax transaction id
58 59 60 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 58 def fax_transaction_id @fax_transaction_id end |
#icsid ⇒ Object
icsid
61 62 63 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 61 def icsid @icsid end |
#merchant_account_profile_oid ⇒ Object
Merchant account profile oid
64 65 66 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 64 def merchant_account_profile_oid @merchant_account_profile_oid end |
#order ⇒ Object
Returns the value of attribute order.
66 67 68 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 66 def order @order end |
#order_id ⇒ Object
Order Id
69 70 71 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 69 def order_id @order_id end |
#partial_card_number ⇒ Object
Partial card number
72 73 74 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 72 def partial_card_number @partial_card_number end |
#pdf_file_oid ⇒ Object
PDF file oid
75 76 77 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 75 def pdf_file_oid @pdf_file_oid end |
#reason_code ⇒ Object
Reason code
78 79 80 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 78 def reason_code @reason_code end |
#status ⇒ Object
Status
81 82 83 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 81 def status @status end |
#website_url ⇒ Object
Website URL
84 85 86 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 84 def website_url @website_url end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
116 117 118 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 116 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 87 def self.attribute_map { :'account_number' => :'account_number', :'adjustment_request_text' => :'adjustment_request_text', :'amount' => :'amount', :'auth_code' => :'auth_code', :'case_number' => :'case_number', :'chargeback_dispute_oid' => :'chargeback_dispute_oid', :'chargeback_dts' => :'chargeback_dts', :'currency' => :'currency', :'customer_care_notes' => :'customer_care_notes', :'encryption_key' => :'encryption_key', :'expiration_dts' => :'expiration_dts', :'fax_failure_reason' => :'fax_failure_reason', :'fax_number' => :'fax_number', :'fax_transaction_id' => :'fax_transaction_id', :'icsid' => :'icsid', :'merchant_account_profile_oid' => :'merchant_account_profile_oid', :'order' => :'order', :'order_id' => :'order_id', :'partial_card_number' => :'partial_card_number', :'pdf_file_oid' => :'pdf_file_oid', :'reason_code' => :'reason_code', :'status' => :'status', :'website_url' => :'website_url' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
531 532 533 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 531 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
150 151 152 153 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 150 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 121 def self.openapi_types { :'account_number' => :'String', :'adjustment_request_text' => :'String', :'amount' => :'Float', :'auth_code' => :'String', :'case_number' => :'String', :'chargeback_dispute_oid' => :'Integer', :'chargeback_dts' => :'String', :'currency' => :'String', :'customer_care_notes' => :'String', :'encryption_key' => :'String', :'expiration_dts' => :'String', :'fax_failure_reason' => :'String', :'fax_number' => :'String', :'fax_transaction_id' => :'Integer', :'icsid' => :'String', :'merchant_account_profile_oid' => :'Integer', :'order' => :'Order', :'order_id' => :'String', :'partial_card_number' => :'String', :'pdf_file_oid' => :'String', :'reason_code' => :'String', :'status' => :'String', :'website_url' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 488 def ==(o) return true if self.equal?(o) self.class == o.class && account_number == o.account_number && adjustment_request_text == o.adjustment_request_text && amount == o.amount && auth_code == o.auth_code && case_number == o.case_number && chargeback_dispute_oid == o.chargeback_dispute_oid && chargeback_dts == o.chargeback_dts && currency == o.currency && customer_care_notes == o.customer_care_notes && encryption_key == o.encryption_key && expiration_dts == o.expiration_dts && fax_failure_reason == o.fax_failure_reason && fax_number == o.fax_number && fax_transaction_id == o.fax_transaction_id && icsid == o.icsid && merchant_account_profile_oid == o.merchant_account_profile_oid && order == o.order && order_id == o.order_id && partial_card_number == o.partial_card_number && pdf_file_oid == o.pdf_file_oid && reason_code == o.reason_code && status == o.status && website_url == o.website_url end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 562 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = UltracartClient.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
633 634 635 636 637 638 639 640 641 642 643 644 645 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 633 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 538 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
518 519 520 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 518 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
524 525 526 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 524 def hash [account_number, adjustment_request_text, amount, auth_code, case_number, chargeback_dispute_oid, chargeback_dts, currency, customer_care_notes, encryption_key, expiration_dts, fax_failure_reason, fax_number, fax_transaction_id, icsid, merchant_account_profile_oid, order, order_id, partial_card_number, pdf_file_oid, reason_code, status, website_url].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 265 def list_invalid_properties invalid_properties = Array.new if !@account_number.nil? && @account_number.to_s.length > 50 invalid_properties.push('invalid value for "account_number", the character length must be smaller than or equal to 50.') end if !@auth_code.nil? && @auth_code.to_s.length > 20 invalid_properties.push('invalid value for "auth_code", the character length must be smaller than or equal to 20.') end if !@case_number.nil? && @case_number.to_s.length > 50 invalid_properties.push('invalid value for "case_number", the character length must be smaller than or equal to 50.') end if !@currency.nil? && @currency.to_s.length > 10 invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 10.') end if !@encryption_key.nil? && @encryption_key.to_s.length > 100 invalid_properties.push('invalid value for "encryption_key", the character length must be smaller than or equal to 100.') end if !@fax_failure_reason.nil? && @fax_failure_reason.to_s.length > 250 invalid_properties.push('invalid value for "fax_failure_reason", the character length must be smaller than or equal to 250.') end if !@fax_number.nil? && @fax_number.to_s.length > 20 invalid_properties.push('invalid value for "fax_number", the character length must be smaller than or equal to 20.') end if !@icsid.nil? && @icsid.to_s.length > 50 invalid_properties.push('invalid value for "icsid", the character length must be smaller than or equal to 50.') end if !@order_id.nil? && @order_id.to_s.length > 30 invalid_properties.push('invalid value for "order_id", the character length must be smaller than or equal to 30.') end if !@partial_card_number.nil? && @partial_card_number.to_s.length > 20 invalid_properties.push('invalid value for "partial_card_number", the character length must be smaller than or equal to 20.') end if !@pdf_file_oid.nil? && @pdf_file_oid.to_s.length > 32 invalid_properties.push('invalid value for "pdf_file_oid", the character length must be smaller than or equal to 32.') end if !@reason_code.nil? && @reason_code.to_s.length > 70 invalid_properties.push('invalid value for "reason_code", the character length must be smaller than or equal to 70.') end if !@status.nil? && @status.to_s.length > 20 invalid_properties.push('invalid value for "status", the character length must be smaller than or equal to 20.') end if !@website_url.nil? && @website_url.to_s.length > 250 invalid_properties.push('invalid value for "website_url", the character length must be smaller than or equal to 250.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
609 610 611 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 609 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
615 616 617 618 619 620 621 622 623 624 625 626 627 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 615 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
603 604 605 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 603 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 328 def valid? return false if !@account_number.nil? && @account_number.to_s.length > 50 return false if !@auth_code.nil? && @auth_code.to_s.length > 20 return false if !@case_number.nil? && @case_number.to_s.length > 50 return false if !@currency.nil? && @currency.to_s.length > 10 return false if !@encryption_key.nil? && @encryption_key.to_s.length > 100 return false if !@fax_failure_reason.nil? && @fax_failure_reason.to_s.length > 250 return false if !@fax_number.nil? && @fax_number.to_s.length > 20 return false if !@icsid.nil? && @icsid.to_s.length > 50 return false if !@order_id.nil? && @order_id.to_s.length > 30 return false if !@partial_card_number.nil? && @partial_card_number.to_s.length > 20 return false if !@pdf_file_oid.nil? && @pdf_file_oid.to_s.length > 32 return false if !@reason_code.nil? && @reason_code.to_s.length > 70 return false if !@status.nil? && @status.to_s.length > 20 return false if !@website_url.nil? && @website_url.to_s.length > 250 true end |