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
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_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 ⇒ Fixnum
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
145 146 147 148 149 150 151 152 153 154 155 156 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 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 145 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'account_number') self.account_number = attributes[:'account_number'] end if attributes.has_key?(:'adjustment_request_text') self.adjustment_request_text = attributes[:'adjustment_request_text'] end if attributes.has_key?(:'amount') self.amount = attributes[:'amount'] end if attributes.has_key?(:'auth_code') self.auth_code = attributes[:'auth_code'] end if attributes.has_key?(:'case_number') self.case_number = attributes[:'case_number'] end if attributes.has_key?(:'chargeback_dispute_oid') self.chargeback_dispute_oid = attributes[:'chargeback_dispute_oid'] end if attributes.has_key?(:'chargeback_dts') self.chargeback_dts = attributes[:'chargeback_dts'] end if attributes.has_key?(:'currency') self.currency = attributes[:'currency'] end if attributes.has_key?(:'customer_care_notes') self.customer_care_notes = attributes[:'customer_care_notes'] end if attributes.has_key?(:'encryption_key') self.encryption_key = attributes[:'encryption_key'] end if attributes.has_key?(:'expiration_dts') self.expiration_dts = attributes[:'expiration_dts'] end if attributes.has_key?(:'fax_failure_reason') self.fax_failure_reason = attributes[:'fax_failure_reason'] end if attributes.has_key?(:'fax_number') self.fax_number = attributes[:'fax_number'] end if attributes.has_key?(:'fax_transaction_id') self.fax_transaction_id = attributes[:'fax_transaction_id'] end if attributes.has_key?(:'icsid') self.icsid = attributes[:'icsid'] end if attributes.has_key?(:'merchant_account_profile_oid') self.merchant_account_profile_oid = attributes[:'merchant_account_profile_oid'] end if attributes.has_key?(:'order') self.order = attributes[:'order'] end if attributes.has_key?(:'order_id') self.order_id = attributes[:'order_id'] end if attributes.has_key?(:'partial_card_number') self.partial_card_number = attributes[:'partial_card_number'] end if attributes.has_key?(:'pdf_file_oid') self.pdf_file_oid = attributes[:'pdf_file_oid'] end if attributes.has_key?(:'reason_code') self.reason_code = attributes[:'reason_code'] end if attributes.has_key?(:'status') self.status = attributes[:'status'] end if attributes.has_key?(:'website_url') self.website_url = attributes[:'website_url'] end end |
Instance Attribute Details
#account_number ⇒ Object
Account number
18 19 20 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 18 def account_number @account_number end |
#adjustment_request_text ⇒ Object
Adjustment request text
21 22 23 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 21 def adjustment_request_text @adjustment_request_text end |
#amount ⇒ Object
Amount
24 25 26 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 24 def amount @amount end |
#auth_code ⇒ Object
Auth code
27 28 29 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 27 def auth_code @auth_code end |
#case_number ⇒ Object
Case number
30 31 32 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 30 def case_number @case_number end |
#chargeback_dispute_oid ⇒ Object
Chargeback Dispute Oid
33 34 35 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 33 def chargeback_dispute_oid @chargeback_dispute_oid end |
#chargeback_dts ⇒ Object
Chargeback dts
36 37 38 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 36 def chargeback_dts @chargeback_dts end |
#currency ⇒ Object
Currency
39 40 41 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 39 def currency @currency end |
#customer_care_notes ⇒ Object
Customer care notes
42 43 44 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 42 def customer_care_notes @customer_care_notes end |
#encryption_key ⇒ Object
Encryption key
45 46 47 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 45 def encryption_key @encryption_key end |
#expiration_dts ⇒ Object
Expiration Dts
48 49 50 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 48 def expiration_dts @expiration_dts end |
#fax_failure_reason ⇒ Object
Fax failure reason
51 52 53 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 51 def fax_failure_reason @fax_failure_reason end |
#fax_number ⇒ Object
Fax number
54 55 56 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 54 def fax_number @fax_number end |
#fax_transaction_id ⇒ Object
Fax transaction id
57 58 59 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 57 def fax_transaction_id @fax_transaction_id end |
#icsid ⇒ Object
icsid
60 61 62 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 60 def icsid @icsid end |
#merchant_account_profile_oid ⇒ Object
Merchant account profile oid
63 64 65 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 63 def merchant_account_profile_oid @merchant_account_profile_oid end |
#order ⇒ Object
Returns the value of attribute order.
65 66 67 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 65 def order @order end |
#order_id ⇒ Object
Order Id
68 69 70 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 68 def order_id @order_id end |
#partial_card_number ⇒ Object
Partial card number
71 72 73 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 71 def partial_card_number @partial_card_number end |
#pdf_file_oid ⇒ Object
PDF file oid
74 75 76 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 74 def pdf_file_oid @pdf_file_oid end |
#reason_code ⇒ Object
Reason code
77 78 79 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 77 def reason_code @reason_code end |
#status ⇒ Object
Status
80 81 82 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 80 def status @status end |
#website_url ⇒ Object
Website URL
83 84 85 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 83 def website_url @website_url end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
86 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 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 86 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 |
.swagger_types ⇒ Object
Attribute type mapping.
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 115 def self.swagger_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.
469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 469 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
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 533 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.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 temp_model = UltracartClient.const_get(type).new temp_model.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
599 600 601 602 603 604 605 606 607 608 609 610 611 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 599 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
512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 512 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if 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 # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
499 500 501 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 499 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
505 506 507 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 505 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?
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 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 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 246 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)
579 580 581 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 579 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
585 586 587 588 589 590 591 592 593 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 585 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
573 574 575 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 573 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
# File 'lib/ultracart_api/models/chargeback_dispute.rb', line 309 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 |