Class: CyberSource::UnderwritingConfigurationOrganizationInformationBusinessInformationBusinessDetails
- Inherits:
-
Object
- Object
- CyberSource::UnderwritingConfigurationOrganizationInformationBusinessInformationBusinessDetails
- Defined in:
- lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb
Instance Attribute Summary collapse
-
#annual_subscription_percent ⇒ Object
% of business is annual subscriptions.
-
#average_order_amount ⇒ Object
Merchant’s average order amount.
-
#country_transactions ⇒ Object
Returns the value of attribute country_transactions.
-
#currencies_in ⇒ Object
Returns the value of attribute currencies_in.
-
#currencies_out ⇒ Object
Returns the value of attribute currencies_out.
-
#currency_type ⇒ Object
Processing Currency.
-
#customer_type ⇒ Object
Who is the business interacting with? Business to Business, Business to Consumer, Both Possible values: - B2B - B2C - Both.
-
#estimated_monthly_sales ⇒ Object
Merchant’s estimated monthly sales.
-
#estimated_monthly_spend ⇒ Object
What is your estimated total monthly spend? Possible values: - <$10,000 - $10,000 - $50,000 - $50,000 - $100,000 - $100,000 - $500,000 - $500,000+.
-
#interaction_types ⇒ Object
Merchant Facing: Face to Face, Card Not Present, Both Possible values: - F2F - CNP - Both.
-
#largest_expected_order_amount ⇒ Object
Merchant’s largest expected order amount.
-
#monthly_subscription_percent ⇒ Object
% of business is monthly subscriptions.
-
#offer_subscriptions ⇒ Object
Does Merchant Offer Subscriptions?.
-
#percentage_split_by_b2_b ⇒ Object
% Split.
-
#percentage_split_by_b2_c ⇒ Object
% Split.
-
#percentage_split_by_cnp ⇒ Object
% Split.
-
#percentage_split_by_f2_f ⇒ Object
% Split.
-
#primary_account_usage ⇒ Object
Primary purpose of account usage Possible values: - Paying for goods / services - Repatriating overseas earnings - Intercompany transfers - Collecting funds from clients - Liquidity / FX - Payment to an individual - Investment activity - Property purchase/sale - Other.
-
#product_services_subscription ⇒ Object
Returns the value of attribute product_services_subscription.
-
#quarterly_subscription_percent ⇒ Object
% of business is quarterly subscriptions.
-
#receive_money3rd_parties ⇒ Object
Will you recieve money from 3rd parties into your account?.
-
#receive_transaction_frequency ⇒ Object
Roughly how often do you expect to send or receive transactions? Possible values: - One-off or infrequently - 1-20 per month - 20-50 per month - 50-100 per month - 100+ per month.
-
#semiannual_subscription_percent ⇒ Object
% of business is semi-annual subscriptions.
-
#source_of_funds ⇒ Object
Source of Funds Possible values: - Business revenue - External or shareholder investment - Loan, advance or other borrowing - Donations or grants - Inter-company transfers - Proceeds of sales of assests - Other.
-
#when_is_customer_charged ⇒ Object
When is the customer charged? Possible values: - OneTimeBeforeServiceDelivery - OneTimeAfterServiceDelivery - Other.
-
#when_is_customer_charged_description ⇒ Object
Returns the value of attribute when_is_customer_charged_description.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
-
.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 = {}) ⇒ UnderwritingConfigurationOrganizationInformationBusinessInformationBusinessDetails
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 = {}) ⇒ UnderwritingConfigurationOrganizationInformationBusinessInformationBusinessDetails
Initializes the object
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 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 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 187 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?(:'customerType') self.customer_type = attributes[:'customerType'] end if attributes.has_key?(:'percentageSplitByB2B') self.percentage_split_by_b2_b = attributes[:'percentageSplitByB2B'] end if attributes.has_key?(:'percentageSplitByB2C') self.percentage_split_by_b2_c = attributes[:'percentageSplitByB2C'] end if attributes.has_key?(:'interactionTypes') self.interaction_types = attributes[:'interactionTypes'] end if attributes.has_key?(:'percentageSplitByF2F') self.percentage_split_by_f2_f = attributes[:'percentageSplitByF2F'] end if attributes.has_key?(:'percentageSplitByCNP') self.percentage_split_by_cnp = attributes[:'percentageSplitByCNP'] end if attributes.has_key?(:'whenIsCustomerCharged') self.when_is_customer_charged = attributes[:'whenIsCustomerCharged'] end if attributes.has_key?(:'whenIsCustomerChargedDescription') self.when_is_customer_charged_description = attributes[:'whenIsCustomerChargedDescription'] end if attributes.has_key?(:'offerSubscriptions') self.offer_subscriptions = attributes[:'offerSubscriptions'] end if attributes.has_key?(:'monthlySubscriptionPercent') self.monthly_subscription_percent = attributes[:'monthlySubscriptionPercent'] end if attributes.has_key?(:'quarterlySubscriptionPercent') self.quarterly_subscription_percent = attributes[:'quarterlySubscriptionPercent'] end if attributes.has_key?(:'semiannualSubscriptionPercent') self.semiannual_subscription_percent = attributes[:'semiannualSubscriptionPercent'] end if attributes.has_key?(:'annualSubscriptionPercent') self.annual_subscription_percent = attributes[:'annualSubscriptionPercent'] end if attributes.has_key?(:'currencyType') self.currency_type = attributes[:'currencyType'] end if attributes.has_key?(:'estimatedMonthlySales') self.estimated_monthly_sales = attributes[:'estimatedMonthlySales'] end if attributes.has_key?(:'averageOrderAmount') self.average_order_amount = attributes[:'averageOrderAmount'] end if attributes.has_key?(:'largestExpectedOrderAmount') self.largest_expected_order_amount = attributes[:'largestExpectedOrderAmount'] end if attributes.has_key?(:'primaryAccountUsage') self.primary_account_usage = attributes[:'primaryAccountUsage'] end if attributes.has_key?(:'sourceOfFunds') self.source_of_funds = attributes[:'sourceOfFunds'] end if attributes.has_key?(:'receiveMoney3rdParties') self.receive_money3rd_parties = attributes[:'receiveMoney3rdParties'] end if attributes.has_key?(:'receiveTransactionFrequency') self.receive_transaction_frequency = attributes[:'receiveTransactionFrequency'] end if attributes.has_key?(:'estimatedMonthlySpend') self.estimated_monthly_spend = attributes[:'estimatedMonthlySpend'] end if attributes.has_key?(:'countryTransactions') if (value = attributes[:'countryTransactions']).is_a?(Array) self.country_transactions = value end end if attributes.has_key?(:'currenciesIn') if (value = attributes[:'currenciesIn']).is_a?(Array) self.currencies_in = value end end if attributes.has_key?(:'currenciesOut') if (value = attributes[:'currenciesOut']).is_a?(Array) self.currencies_out = value end end if attributes.has_key?(:'productServicesSubscription') if (value = attributes[:'productServicesSubscription']).is_a?(Array) self.product_services_subscription = value end end end |
Instance Attribute Details
#annual_subscription_percent ⇒ Object
% of business is annual subscriptions
52 53 54 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 52 def annual_subscription_percent @annual_subscription_percent end |
#average_order_amount ⇒ Object
Merchant’s average order amount
61 62 63 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 61 def average_order_amount @average_order_amount end |
#country_transactions ⇒ Object
Returns the value of attribute country_transactions.
81 82 83 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 81 def country_transactions @country_transactions end |
#currencies_in ⇒ Object
Returns the value of attribute currencies_in.
83 84 85 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 83 def currencies_in @currencies_in end |
#currencies_out ⇒ Object
Returns the value of attribute currencies_out.
85 86 87 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 85 def currencies_out @currencies_out end |
#currency_type ⇒ Object
Processing Currency. ISO 4217, 3 characters. Possible values: - USD - CAD - EUR - GBP - CHF
55 56 57 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 55 def currency_type @currency_type end |
#customer_type ⇒ Object
Who is the business interacting with? Business to Business, Business to Consumer, Both Possible values: - B2B - B2C - Both
17 18 19 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 17 def customer_type @customer_type end |
#estimated_monthly_sales ⇒ Object
Merchant’s estimated monthly sales
58 59 60 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 58 def estimated_monthly_sales @estimated_monthly_sales end |
#estimated_monthly_spend ⇒ Object
What is your estimated total monthly spend? Possible values: - <$10,000 - $10,000 - $50,000 - $50,000 - $100,000 - $100,000 - $500,000 - $500,000+
79 80 81 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 79 def estimated_monthly_spend @estimated_monthly_spend end |
#interaction_types ⇒ Object
Merchant Facing: Face to Face, Card Not Present, Both Possible values: - F2F - CNP - Both
26 27 28 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 26 def interaction_types @interaction_types end |
#largest_expected_order_amount ⇒ Object
Merchant’s largest expected order amount
64 65 66 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 64 def largest_expected_order_amount @largest_expected_order_amount end |
#monthly_subscription_percent ⇒ Object
% of business is monthly subscriptions
43 44 45 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 43 def monthly_subscription_percent @monthly_subscription_percent end |
#offer_subscriptions ⇒ Object
Does Merchant Offer Subscriptions?
40 41 42 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 40 def offer_subscriptions @offer_subscriptions end |
#percentage_split_by_b2_b ⇒ Object
% Split
20 21 22 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 20 def percentage_split_by_b2_b @percentage_split_by_b2_b end |
#percentage_split_by_b2_c ⇒ Object
% Split
23 24 25 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 23 def percentage_split_by_b2_c @percentage_split_by_b2_c end |
#percentage_split_by_cnp ⇒ Object
% Split
32 33 34 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 32 def percentage_split_by_cnp @percentage_split_by_cnp end |
#percentage_split_by_f2_f ⇒ Object
% Split
29 30 31 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 29 def percentage_split_by_f2_f @percentage_split_by_f2_f end |
#primary_account_usage ⇒ Object
Primary purpose of account usage Possible values: - Paying for goods / services - Repatriating overseas earnings - Intercompany transfers - Collecting funds from clients - Liquidity / FX - Payment to an individual - Investment activity - Property purchase/sale - Other
67 68 69 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 67 def primary_account_usage @primary_account_usage end |
#product_services_subscription ⇒ Object
Returns the value of attribute product_services_subscription.
87 88 89 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 87 def product_services_subscription @product_services_subscription end |
#quarterly_subscription_percent ⇒ Object
% of business is quarterly subscriptions
46 47 48 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 46 def quarterly_subscription_percent @quarterly_subscription_percent end |
#receive_money3rd_parties ⇒ Object
Will you recieve money from 3rd parties into your account?
73 74 75 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 73 def receive_money3rd_parties @receive_money3rd_parties end |
#receive_transaction_frequency ⇒ Object
Roughly how often do you expect to send or receive transactions? Possible values: - One-off or infrequently - 1-20 per month - 20-50 per month - 50-100 per month - 100+ per month
76 77 78 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 76 def receive_transaction_frequency @receive_transaction_frequency end |
#semiannual_subscription_percent ⇒ Object
% of business is semi-annual subscriptions
49 50 51 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 49 def semiannual_subscription_percent @semiannual_subscription_percent end |
#source_of_funds ⇒ Object
Source of Funds Possible values: - Business revenue - External or shareholder investment - Loan, advance or other borrowing - Donations or grants - Inter-company transfers - Proceeds of sales of assests - Other
70 71 72 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 70 def source_of_funds @source_of_funds end |
#when_is_customer_charged ⇒ Object
When is the customer charged? Possible values: - OneTimeBeforeServiceDelivery - OneTimeAfterServiceDelivery - Other
35 36 37 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 35 def when_is_customer_charged @when_is_customer_charged end |
#when_is_customer_charged_description ⇒ Object
Returns the value of attribute when_is_customer_charged_description.
37 38 39 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 37 def when_is_customer_charged_description @when_is_customer_charged_description end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 90 def self.attribute_map { :'customer_type' => :'customerType', :'percentage_split_by_b2_b' => :'percentageSplitByB2B', :'percentage_split_by_b2_c' => :'percentageSplitByB2C', :'interaction_types' => :'interactionTypes', :'percentage_split_by_f2_f' => :'percentageSplitByF2F', :'percentage_split_by_cnp' => :'percentageSplitByCNP', :'when_is_customer_charged' => :'whenIsCustomerCharged', :'when_is_customer_charged_description' => :'whenIsCustomerChargedDescription', :'offer_subscriptions' => :'offerSubscriptions', :'monthly_subscription_percent' => :'monthlySubscriptionPercent', :'quarterly_subscription_percent' => :'quarterlySubscriptionPercent', :'semiannual_subscription_percent' => :'semiannualSubscriptionPercent', :'annual_subscription_percent' => :'annualSubscriptionPercent', :'currency_type' => :'currencyType', :'estimated_monthly_sales' => :'estimatedMonthlySales', :'average_order_amount' => :'averageOrderAmount', :'largest_expected_order_amount' => :'largestExpectedOrderAmount', :'primary_account_usage' => :'primaryAccountUsage', :'source_of_funds' => :'sourceOfFunds', :'receive_money3rd_parties' => :'receiveMoney3rdParties', :'receive_transaction_frequency' => :'receiveTransactionFrequency', :'estimated_monthly_spend' => :'estimatedMonthlySpend', :'country_transactions' => :'countryTransactions', :'currencies_in' => :'currenciesIn', :'currencies_out' => :'currenciesOut', :'product_services_subscription' => :'productServicesSubscription' } end |
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
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 148 149 150 151 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 122 def self.json_map { :'customer_type' => :'customer_type', :'percentage_split_by_b2_b' => :'percentage_split_by_b2_b', :'percentage_split_by_b2_c' => :'percentage_split_by_b2_c', :'interaction_types' => :'interaction_types', :'percentage_split_by_f2_f' => :'percentage_split_by_f2_f', :'percentage_split_by_cnp' => :'percentage_split_by_cnp', :'when_is_customer_charged' => :'when_is_customer_charged', :'when_is_customer_charged_description' => :'when_is_customer_charged_description', :'offer_subscriptions' => :'offer_subscriptions', :'monthly_subscription_percent' => :'monthly_subscription_percent', :'quarterly_subscription_percent' => :'quarterly_subscription_percent', :'semiannual_subscription_percent' => :'semiannual_subscription_percent', :'annual_subscription_percent' => :'annual_subscription_percent', :'currency_type' => :'currency_type', :'estimated_monthly_sales' => :'estimated_monthly_sales', :'average_order_amount' => :'average_order_amount', :'largest_expected_order_amount' => :'largest_expected_order_amount', :'primary_account_usage' => :'primary_account_usage', :'source_of_funds' => :'source_of_funds', :'receive_money3rd_parties' => :'receive_money3rd_parties', :'receive_transaction_frequency' => :'receive_transaction_frequency', :'estimated_monthly_spend' => :'estimated_monthly_spend', :'country_transactions' => :'country_transactions', :'currencies_in' => :'currencies_in', :'currencies_out' => :'currencies_out', :'product_services_subscription' => :'product_services_subscription' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 154 def self.swagger_types { :'customer_type' => :'String', :'percentage_split_by_b2_b' => :'Float', :'percentage_split_by_b2_c' => :'Float', :'interaction_types' => :'String', :'percentage_split_by_f2_f' => :'Float', :'percentage_split_by_cnp' => :'Float', :'when_is_customer_charged' => :'String', :'when_is_customer_charged_description' => :'String', :'offer_subscriptions' => :'BOOLEAN', :'monthly_subscription_percent' => :'Float', :'quarterly_subscription_percent' => :'Float', :'semiannual_subscription_percent' => :'Float', :'annual_subscription_percent' => :'Float', :'currency_type' => :'String', :'estimated_monthly_sales' => :'Float', :'average_order_amount' => :'Float', :'largest_expected_order_amount' => :'Float', :'primary_account_usage' => :'String', :'source_of_funds' => :'String', :'receive_money3rd_parties' => :'BOOLEAN', :'receive_transaction_frequency' => :'String', :'estimated_monthly_spend' => :'String', :'country_transactions' => :'Array<String>', :'currencies_in' => :'Array<String>', :'currencies_out' => :'Array<String>', :'product_services_subscription' => :'Array<UnderwritingConfigurationOrganizationInformationBusinessInformationBusinessDetailsProductServicesSubscription>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 408 def ==(o) return true if self.equal?(o) self.class == o.class && customer_type == o.customer_type && percentage_split_by_b2_b == o.percentage_split_by_b2_b && percentage_split_by_b2_c == o.percentage_split_by_b2_c && interaction_types == o.interaction_types && percentage_split_by_f2_f == o.percentage_split_by_f2_f && percentage_split_by_cnp == o.percentage_split_by_cnp && when_is_customer_charged == o.when_is_customer_charged && when_is_customer_charged_description == o.when_is_customer_charged_description && offer_subscriptions == o.offer_subscriptions && monthly_subscription_percent == o.monthly_subscription_percent && quarterly_subscription_percent == o.quarterly_subscription_percent && semiannual_subscription_percent == o.semiannual_subscription_percent && annual_subscription_percent == o.annual_subscription_percent && currency_type == o.currency_type && estimated_monthly_sales == o.estimated_monthly_sales && average_order_amount == o.average_order_amount && largest_expected_order_amount == o.largest_expected_order_amount && primary_account_usage == o.primary_account_usage && source_of_funds == o.source_of_funds && receive_money3rd_parties == o.receive_money3rd_parties && receive_transaction_frequency == o.receive_transaction_frequency && estimated_monthly_spend == o.estimated_monthly_spend && country_transactions == o.country_transactions && currencies_in == o.currencies_in && currencies_out == o.currencies_out && product_services_subscription == o.product_services_subscription end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 475 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 = CyberSource.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
541 542 543 544 545 546 547 548 549 550 551 552 553 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 541 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
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 454 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 the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{self.class.json_map[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
441 442 443 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 441 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
447 448 449 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 447 def hash [customer_type, percentage_split_by_b2_b, percentage_split_by_b2_c, interaction_types, percentage_split_by_f2_f, percentage_split_by_cnp, when_is_customer_charged, when_is_customer_charged_description, offer_subscriptions, monthly_subscription_percent, quarterly_subscription_percent, semiannual_subscription_percent, annual_subscription_percent, currency_type, estimated_monthly_sales, average_order_amount, largest_expected_order_amount, primary_account_usage, source_of_funds, receive_money3rd_parties, receive_transaction_frequency, estimated_monthly_spend, country_transactions, currencies_in, currencies_out, product_services_subscription].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 308 def list_invalid_properties invalid_properties = Array.new if @interaction_types.nil? invalid_properties.push('invalid value for "interaction_types", interaction_types cannot be nil.') end if @percentage_split_by_f2_f.nil? invalid_properties.push('invalid value for "percentage_split_by_f2_f", percentage_split_by_f2_f cannot be nil.') end if @percentage_split_by_cnp.nil? invalid_properties.push('invalid value for "percentage_split_by_cnp", percentage_split_by_cnp cannot be nil.') end if @when_is_customer_charged.nil? invalid_properties.push('invalid value for "when_is_customer_charged", when_is_customer_charged cannot be nil.') end if @offer_subscriptions.nil? invalid_properties.push('invalid value for "offer_subscriptions", offer_subscriptions cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
521 522 523 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 521 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
527 528 529 530 531 532 533 534 535 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 527 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
515 516 517 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 515 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
335 336 337 338 339 340 341 342 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_business_details.rb', line 335 def valid? return false if @interaction_types.nil? return false if @percentage_split_by_f2_f.nil? return false if @percentage_split_by_cnp.nil? return false if @when_is_customer_charged.nil? return false if @offer_subscriptions.nil? true end |