Class: Tremendous::ListFundingSources200ResponseFundingSourcesInnerMeta
- Inherits:
-
Object
- Object
- Tremendous::ListFundingSources200ResponseFundingSourcesInnerMeta
- Defined in:
- lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#account_number_mask ⇒ Object
**Only available when ‘method` is set to `bank_account`.** Last 4 digits of the account number.
-
#account_routing_mask ⇒ Object
**Only available when ‘method` is set to `bank_account`.** Last 4 digits of the routing number.
-
#account_type ⇒ Object
**Only available when ‘method` is set to `bank_account`.** Is this a checking or savings account.
-
#accountholder_name ⇒ Object
**Only available when ‘method` is set to `bank_account` or `credit_card`.** Name of the holder of the bank account or credit_card.
-
#address_1 ⇒ Object
**Only available when ‘method` is set to `invoice`.** Primary billing address line.
-
#address_2 ⇒ Object
**Only available when ‘method` is set to `invoice`.** Secondary billing address line.
-
#available_cents ⇒ Object
**Only exists for balance and commercial invoicing.** For balance: available amount (in cents USD) For commercial invoicing: available credit amount calculated as (credit limit - outstanding balance) (in cents USD) *Caution: In the "list funding sources" endpoint this value is cached and may not be up to date.
-
#bank_name ⇒ Object
**Only available when ‘method` is set to `bank_account`.** Name of the bank.
-
#city ⇒ Object
**Only available when ‘method` is set to `invoice`.** Billing address city.
-
#company_name ⇒ Object
**Only available when ‘method` is set to `invoice`.** Company name for invoice billing.
-
#credit_limit_cents ⇒ Object
**Only exists for commercial invoicing.** Available credit limit (in cents USD).
-
#day_of_week ⇒ Object
**Only available when ‘method` is set to `invoice` and `invoice_type` is `commercial`.** Day of the week when commercial invoices are generated ("0"=Sunday, "1"=Monday, etc.).
-
#emails ⇒ Object
**Only available when ‘method` is set to `invoice`.** Email addresses for invoice delivery (comma-separated).
-
#expired ⇒ Object
**Only available when ‘method` is set to `credit_card`.** Is this credit card expired.
-
#failure_details ⇒ Object
Returns the value of attribute failure_details.
-
#interval ⇒ Object
**Only available when ‘method` is set to `invoice` and `invoice_type` is `commercial`.** Billing interval for commercial invoice generation (e.g., daily, weekly, monthly, twice_monthly).
-
#invoice_type ⇒ Object
**Only available when ‘method` is set to `invoice`.** Type of invoice account (e.g., commercial, pro_forma, prefunding_only).
-
#last4 ⇒ Object
**Only available when ‘method` is set to `credit_card`.** Last 4 digits of the credit card number.
-
#last_payment_failed_at ⇒ Object
**Only available when ‘method` is set to `bank_account` or `credit_card`.** Point in time when the last order failed using this bank account or credit card as a funding source.
-
#month ⇒ Object
**Only available when ‘method` is set to `credit_card`.** Month part of card’s expiration date.
-
#net ⇒ Object
**Only available when ‘method` is set to `invoice`.** Net payment terms in days (e.g., "30" for Net 30).
-
#network ⇒ Object
**Only available when ‘method` is set to `credit_card`.** Network of the credit card.
-
#pending_cents ⇒ Object
**Only available when ‘method` is set to `balance`.** Funds that are already registered on your Tremendous account but which have not yet been deposited in your account (e.g. payments that need to be manually reviewed by our ops team) (in Cents USD).
-
#phone ⇒ Object
**Only available when ‘method` is set to `invoice`.** Contact phone number for billing.
-
#refundable ⇒ Object
**Only available when ‘method` is set to `bank_account`.** Can refunds be deposited to this bank account.
-
#state ⇒ Object
**Only available when ‘method` is set to `invoice`.** Billing address state or province.
-
#year ⇒ Object
**Only available when ‘method` is set to `credit_card`.** Year part of card’s expiration date.
-
#zip ⇒ Object
**Only available when ‘method` is set to `invoice`.** Billing address postal code.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.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.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ListFundingSources200ResponseFundingSourcesInnerMeta
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 = {}) ⇒ ListFundingSources200ResponseFundingSourcesInnerMeta
Initializes the object
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 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 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 221 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::ListFundingSources200ResponseFundingSourcesInnerMeta` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ListFundingSources200ResponseFundingSourcesInnerMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'available_cents') self.available_cents = attributes[:'available_cents'] end if attributes.key?(:'pending_cents') self.pending_cents = attributes[:'pending_cents'] end if attributes.key?(:'credit_limit_cents') self.credit_limit_cents = attributes[:'credit_limit_cents'] end if attributes.key?(:'accountholder_name') self.accountholder_name = attributes[:'accountholder_name'] end if attributes.key?(:'account_type') self.account_type = attributes[:'account_type'] end if attributes.key?(:'bank_name') self.bank_name = attributes[:'bank_name'] end if attributes.key?(:'account_number_mask') self.account_number_mask = attributes[:'account_number_mask'] end if attributes.key?(:'account_routing_mask') self.account_routing_mask = attributes[:'account_routing_mask'] end if attributes.key?(:'refundable') self.refundable = attributes[:'refundable'] end if attributes.key?(:'network') self.network = attributes[:'network'] end if attributes.key?(:'last4') self.last4 = attributes[:'last4'] end if attributes.key?(:'expired') self.expired = attributes[:'expired'] end if attributes.key?(:'year') self.year = attributes[:'year'] end if attributes.key?(:'month') self.month = attributes[:'month'] end if attributes.key?(:'last_payment_failed_at') self.last_payment_failed_at = attributes[:'last_payment_failed_at'] end if attributes.key?(:'invoice_type') self.invoice_type = attributes[:'invoice_type'] end if attributes.key?(:'interval') self.interval = attributes[:'interval'] end if attributes.key?(:'day_of_week') self.day_of_week = attributes[:'day_of_week'] end if attributes.key?(:'net') self.net = attributes[:'net'] end if attributes.key?(:'company_name') self.company_name = attributes[:'company_name'] end if attributes.key?(:'address_1') self.address_1 = attributes[:'address_1'] end if attributes.key?(:'address_2') self.address_2 = attributes[:'address_2'] end if attributes.key?(:'city') self.city = attributes[:'city'] end if attributes.key?(:'state') self.state = attributes[:'state'] end if attributes.key?(:'zip') self.zip = attributes[:'zip'] end if attributes.key?(:'phone') self.phone = attributes[:'phone'] end if attributes.key?(:'emails') self.emails = attributes[:'emails'] end if attributes.key?(:'failure_details') self.failure_details = attributes[:'failure_details'] end end |
Instance Attribute Details
#account_number_mask ⇒ Object
**Only available when ‘method` is set to `bank_account`.** Last 4 digits of the account number
37 38 39 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 37 def account_number_mask @account_number_mask end |
#account_routing_mask ⇒ Object
**Only available when ‘method` is set to `bank_account`.** Last 4 digits of the routing number
40 41 42 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 40 def account_routing_mask @account_routing_mask end |
#account_type ⇒ Object
**Only available when ‘method` is set to `bank_account`.** Is this a checking or savings account
31 32 33 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 31 def account_type @account_type end |
#accountholder_name ⇒ Object
**Only available when ‘method` is set to `bank_account` or `credit_card`.** Name of the holder of the bank account or credit_card
28 29 30 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 28 def accountholder_name @accountholder_name end |
#address_1 ⇒ Object
**Only available when ‘method` is set to `invoice`.** Primary billing address line
79 80 81 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 79 def address_1 @address_1 end |
#address_2 ⇒ Object
**Only available when ‘method` is set to `invoice`.** Secondary billing address line
82 83 84 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 82 def address_2 @address_2 end |
#available_cents ⇒ Object
**Only exists for balance and commercial invoicing.** For balance: available amount (in cents USD) For commercial invoicing: available credit amount calculated as (credit limit - outstanding balance) (in cents USD) *Caution: In the "list funding sources" endpoint this value is cached and may not be up to date. Use the "get funding source" endpoint to get the most up to date value.*
19 20 21 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 19 def available_cents @available_cents end |
#bank_name ⇒ Object
**Only available when ‘method` is set to `bank_account`.** Name of the bank
34 35 36 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 34 def bank_name @bank_name end |
#city ⇒ Object
**Only available when ‘method` is set to `invoice`.** Billing address city
85 86 87 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 85 def city @city end |
#company_name ⇒ Object
**Only available when ‘method` is set to `invoice`.** Company name for invoice billing
76 77 78 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 76 def company_name @company_name end |
#credit_limit_cents ⇒ Object
**Only exists for commercial invoicing.** Available credit limit (in cents USD)
25 26 27 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 25 def credit_limit_cents @credit_limit_cents end |
#day_of_week ⇒ Object
**Only available when ‘method` is set to `invoice` and `invoice_type` is `commercial`.** Day of the week when commercial invoices are generated ("0"=Sunday, "1"=Monday, etc.). Returns `null` for pro forma invoices.
70 71 72 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 70 def day_of_week @day_of_week end |
#emails ⇒ Object
**Only available when ‘method` is set to `invoice`.** Email addresses for invoice delivery (comma-separated)
97 98 99 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 97 def emails @emails end |
#expired ⇒ Object
**Only available when ‘method` is set to `credit_card`.** Is this credit card expired
52 53 54 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 52 def expired @expired end |
#failure_details ⇒ Object
Returns the value of attribute failure_details.
99 100 101 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 99 def failure_details @failure_details end |
#interval ⇒ Object
**Only available when ‘method` is set to `invoice` and `invoice_type` is `commercial`.** Billing interval for commercial invoice generation (e.g., daily, weekly, monthly, twice_monthly). Returns `null` for pro forma invoices.
67 68 69 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 67 def interval @interval end |
#invoice_type ⇒ Object
**Only available when ‘method` is set to `invoice`.** Type of invoice account (e.g., commercial, pro_forma, prefunding_only)
64 65 66 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 64 def invoice_type @invoice_type end |
#last4 ⇒ Object
**Only available when ‘method` is set to `credit_card`.** Last 4 digits of the credit card number
49 50 51 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 49 def last4 @last4 end |
#last_payment_failed_at ⇒ Object
**Only available when ‘method` is set to `bank_account` or `credit_card`.** Point in time when the last order failed using this bank account or credit card as a funding source.
61 62 63 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 61 def last_payment_failed_at @last_payment_failed_at end |
#month ⇒ Object
**Only available when ‘method` is set to `credit_card`.** Month part of card’s expiration date
58 59 60 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 58 def month @month end |
#net ⇒ Object
**Only available when ‘method` is set to `invoice`.** Net payment terms in days (e.g., "30" for Net 30)
73 74 75 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 73 def net @net end |
#network ⇒ Object
**Only available when ‘method` is set to `credit_card`.** Network of the credit card
46 47 48 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 46 def network @network end |
#pending_cents ⇒ Object
**Only available when ‘method` is set to `balance`.** Funds that are already registered on your Tremendous account but which have not yet been deposited in your account (e.g. payments that need to be manually reviewed by our ops team) (in Cents USD).
22 23 24 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 22 def pending_cents @pending_cents end |
#phone ⇒ Object
**Only available when ‘method` is set to `invoice`.** Contact phone number for billing
94 95 96 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 94 def phone @phone end |
#refundable ⇒ Object
**Only available when ‘method` is set to `bank_account`.** Can refunds be deposited to this bank account
43 44 45 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 43 def refundable @refundable end |
#state ⇒ Object
**Only available when ‘method` is set to `invoice`.** Billing address state or province
88 89 90 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 88 def state @state end |
#year ⇒ Object
**Only available when ‘method` is set to `credit_card`.** Year part of card’s expiration date
55 56 57 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 55 def year @year end |
#zip ⇒ Object
**Only available when ‘method` is set to `invoice`.** Billing address postal code
91 92 93 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 91 def zip @zip end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
524 525 526 527 528 529 530 531 532 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 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 524 def self._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 = Tremendous.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
158 159 160 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 158 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
163 164 165 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 163 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 124 def self.attribute_map { :'available_cents' => :'available_cents', :'pending_cents' => :'pending_cents', :'credit_limit_cents' => :'credit_limit_cents', :'accountholder_name' => :'accountholder_name', :'account_type' => :'account_type', :'bank_name' => :'bank_name', :'account_number_mask' => :'account_number_mask', :'account_routing_mask' => :'account_routing_mask', :'refundable' => :'refundable', :'network' => :'network', :'last4' => :'last4', :'expired' => :'expired', :'year' => :'year', :'month' => :'month', :'last_payment_failed_at' => :'last_payment_failed_at', :'invoice_type' => :'invoice_type', :'interval' => :'interval', :'day_of_week' => :'day_of_week', :'net' => :'net', :'company_name' => :'company_name', :'address_1' => :'address_1', :'address_2' => :'address_2', :'city' => :'city', :'state' => :'state', :'zip' => :'zip', :'phone' => :'phone', :'emails' => :'emails', :'failure_details' => :'failure_details' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 500 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{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[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 202 def self.openapi_nullable Set.new([ :'bank_name', :'last_payment_failed_at', :'interval', :'day_of_week', :'address_1', :'address_2', :'city', :'state', :'zip', :'phone', :'emails', :'failure_details' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 168 def self.openapi_types { :'available_cents' => :'Integer', :'pending_cents' => :'Integer', :'credit_limit_cents' => :'Integer', :'accountholder_name' => :'String', :'account_type' => :'String', :'bank_name' => :'String', :'account_number_mask' => :'String', :'account_routing_mask' => :'String', :'refundable' => :'Boolean', :'network' => :'String', :'last4' => :'String', :'expired' => :'Boolean', :'year' => :'String', :'month' => :'String', :'last_payment_failed_at' => :'Time', :'invoice_type' => :'String', :'interval' => :'String', :'day_of_week' => :'String', :'net' => :'String', :'company_name' => :'String', :'address_1' => :'String', :'address_2' => :'String', :'city' => :'String', :'state' => :'String', :'zip' => :'String', :'phone' => :'String', :'emails' => :'String', :'failure_details' => :'ListFundingSources200ResponseFundingSourcesInnerMetaFailureDetails' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 452 def ==(o) return true if self.equal?(o) self.class == o.class && available_cents == o.available_cents && pending_cents == o.pending_cents && credit_limit_cents == o.credit_limit_cents && accountholder_name == o.accountholder_name && account_type == o.account_type && bank_name == o.bank_name && account_number_mask == o.account_number_mask && account_routing_mask == o.account_routing_mask && refundable == o.refundable && network == o.network && last4 == o.last4 && expired == o.expired && year == o.year && month == o.month && last_payment_failed_at == o.last_payment_failed_at && invoice_type == o.invoice_type && interval == o.interval && day_of_week == o.day_of_week && net == o.net && company_name == o.company_name && address_1 == o.address_1 && address_2 == o.address_2 && city == o.city && state == o.state && zip == o.zip && phone == o.phone && emails == o.emails && failure_details == o.failure_details end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
595 596 597 598 599 600 601 602 603 604 605 606 607 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 595 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 |
#eql?(o) ⇒ Boolean
487 488 489 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 487 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
493 494 495 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 493 def hash [available_cents, pending_cents, credit_limit_cents, accountholder_name, account_type, bank_name, account_number_mask, account_routing_mask, refundable, network, last4, expired, year, month, last_payment_failed_at, invoice_type, interval, day_of_week, net, company_name, address_1, address_2, city, state, zip, phone, emails, failure_details].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 350 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new pattern = Regexp.new(/[0-9]{4}/) if !@account_number_mask.nil? && @account_number_mask !~ pattern invalid_properties.push("invalid value for \"account_number_mask\", must conform to the pattern #{pattern}.") end pattern = Regexp.new(/[0-9]{4}/) if !@account_routing_mask.nil? && @account_routing_mask !~ pattern invalid_properties.push("invalid value for \"account_routing_mask\", must conform to the pattern #{pattern}.") end pattern = Regexp.new(/[0-9]{4}/) if !@last4.nil? && @last4 !~ pattern invalid_properties.push("invalid value for \"last4\", must conform to the pattern #{pattern}.") end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
571 572 573 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 571 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
577 578 579 580 581 582 583 584 585 586 587 588 589 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 577 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
565 566 567 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 565 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
373 374 375 376 377 378 379 380 381 382 383 |
# File 'lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb', line 373 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' account_type_validator = EnumAttributeValidator.new('String', ["checking", "savings"]) return false unless account_type_validator.valid?(@account_type) return false if !@account_number_mask.nil? && @account_number_mask !~ Regexp.new(/[0-9]{4}/) return false if !@account_routing_mask.nil? && @account_routing_mask !~ Regexp.new(/[0-9]{4}/) network_validator = EnumAttributeValidator.new('String', ["MasterCard", "Amex", "JCB", "Diner's Club", "Visa", "Discover", "Laser", "Elo", "Maestro", "Solo"]) return false unless network_validator.valid?(@network) return false if !@last4.nil? && @last4 !~ Regexp.new(/[0-9]{4}/) true end |