Class: UltracartClient::PaymentsConfigurationWePay
- Inherits:
-
Object
- Object
- UltracartClient::PaymentsConfigurationWePay
- Defined in:
- lib/ultracart_api/models/payments_configuration_we_pay.rb
Instance Attribute Summary collapse
-
#accept_wepay ⇒ Object
Master flag indicating this merchant accepts UltraCart Payments WePay.
-
#account_update_uri ⇒ Object
URI for updating the WePay account.
-
#address1 ⇒ Object
Address line 1.
-
#address2 ⇒ Object
Address line 2.
-
#canada_accept_debit_cards ⇒ Object
For Canadian merchants, true if they wish to accept debit cards.
-
#city ⇒ Object
City.
-
#company ⇒ Object
Company.
-
#company_description ⇒ Object
Company description.
-
#console_hostname ⇒ Object
Console hostname.
-
#country ⇒ Object
Country.
-
#credit_card_rate ⇒ Object
WePay credit card rate.
-
#currency ⇒ Object
Base currency for transactions.
-
#expected_revenue ⇒ Object
Expected Revenue.
-
#hide_credit_card_non_ultracart_payments ⇒ Object
Internal flag to aid UI.
-
#hide_surcharge_amount ⇒ Object
Internal flag to aid UI.
-
#industry ⇒ Object
Industry.
-
#owner_email ⇒ Object
Owner email.
-
#owner_name ⇒ Object
Owner name.
-
#owner_phone ⇒ Object
Owner phone.
-
#postal_code ⇒ Object
Postal code.
-
#remove_pay_pal_pro ⇒ Object
Returns the value of attribute remove_pay_pal_pro.
-
#restrictions ⇒ Object
Returns the value of attribute restrictions.
-
#short_paypal_marketing_text ⇒ Object
Internal UI aid.
-
#show_ultracart_payments_disabled ⇒ Object
Internal flag to aid UI.
-
#show_ultracart_payments_intro ⇒ Object
Internal flag to aid UI.
-
#show_ultracart_payments_verification ⇒ Object
Internal flag to aid UI.
-
#show_ultracart_payments_verified ⇒ Object
Internal flag to aid UI.
-
#state ⇒ Object
State.
-
#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 = {}) ⇒ PaymentsConfigurationWePay
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 = {}) ⇒ PaymentsConfigurationWePay
Initializes the object
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 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 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 174 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?(:'accept_wepay') self.accept_wepay = attributes[:'accept_wepay'] end if attributes.has_key?(:'account_update_uri') self.account_update_uri = attributes[:'account_update_uri'] end if attributes.has_key?(:'address1') self.address1 = attributes[:'address1'] end if attributes.has_key?(:'address2') self.address2 = attributes[:'address2'] end if attributes.has_key?(:'canada_accept_debit_cards') self.canada_accept_debit_cards = attributes[:'canada_accept_debit_cards'] end if attributes.has_key?(:'city') self.city = attributes[:'city'] end if attributes.has_key?(:'company') self.company = attributes[:'company'] end if attributes.has_key?(:'company_description') self.company_description = attributes[:'company_description'] end if attributes.has_key?(:'console_hostname') self.console_hostname = attributes[:'console_hostname'] end if attributes.has_key?(:'country') self.country = attributes[:'country'] end if attributes.has_key?(:'credit_card_rate') self.credit_card_rate = attributes[:'credit_card_rate'] end if attributes.has_key?(:'currency') self.currency = attributes[:'currency'] end if attributes.has_key?(:'expected_revenue') self.expected_revenue = attributes[:'expected_revenue'] end if attributes.has_key?(:'hide_credit_card_non_ultracart_payments') self.hide_credit_card_non_ultracart_payments = attributes[:'hide_credit_card_non_ultracart_payments'] end if attributes.has_key?(:'hide_surcharge_amount') self.hide_surcharge_amount = attributes[:'hide_surcharge_amount'] end if attributes.has_key?(:'industry') self.industry = attributes[:'industry'] end if attributes.has_key?(:'owner_email') self.owner_email = attributes[:'owner_email'] end if attributes.has_key?(:'owner_name') self.owner_name = attributes[:'owner_name'] end if attributes.has_key?(:'owner_phone') self.owner_phone = attributes[:'owner_phone'] end if attributes.has_key?(:'postal_code') self.postal_code = attributes[:'postal_code'] end if attributes.has_key?(:'removePayPalPro') self.remove_pay_pal_pro = attributes[:'removePayPalPro'] end if attributes.has_key?(:'restrictions') self.restrictions = attributes[:'restrictions'] end if attributes.has_key?(:'short_paypal_marketing_text') self.short_paypal_marketing_text = attributes[:'short_paypal_marketing_text'] end if attributes.has_key?(:'show_ultracart_payments_disabled') self.show_ultracart_payments_disabled = attributes[:'show_ultracart_payments_disabled'] end if attributes.has_key?(:'show_ultracart_payments_intro') self.show_ultracart_payments_intro = attributes[:'show_ultracart_payments_intro'] end if attributes.has_key?(:'show_ultracart_payments_verification') self.show_ultracart_payments_verification = attributes[:'show_ultracart_payments_verification'] end if attributes.has_key?(:'show_ultracart_payments_verified') self.show_ultracart_payments_verified = attributes[:'show_ultracart_payments_verified'] end if attributes.has_key?(:'state') self.state = attributes[:'state'] end if attributes.has_key?(:'website_url') self.website_url = attributes[:'website_url'] end end |
Instance Attribute Details
#accept_wepay ⇒ Object
Master flag indicating this merchant accepts UltraCart Payments WePay
18 19 20 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 18 def accept_wepay @accept_wepay end |
#account_update_uri ⇒ Object
URI for updating the WePay account
21 22 23 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 21 def account_update_uri @account_update_uri end |
#address1 ⇒ Object
Address line 1
24 25 26 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 24 def address1 @address1 end |
#address2 ⇒ Object
Address line 2
27 28 29 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 27 def address2 @address2 end |
#canada_accept_debit_cards ⇒ Object
For Canadian merchants, true if they wish to accept debit cards
30 31 32 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 30 def canada_accept_debit_cards @canada_accept_debit_cards end |
#city ⇒ Object
City
33 34 35 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 33 def city @city end |
#company ⇒ Object
Company
36 37 38 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 36 def company @company end |
#company_description ⇒ Object
Company description
39 40 41 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 39 def company_description @company_description end |
#console_hostname ⇒ Object
Console hostname
42 43 44 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 42 def console_hostname @console_hostname end |
#country ⇒ Object
Country
45 46 47 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 45 def country @country end |
#credit_card_rate ⇒ Object
WePay credit card rate
48 49 50 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 48 def credit_card_rate @credit_card_rate end |
#currency ⇒ Object
Base currency for transactions
51 52 53 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 51 def currency @currency end |
#expected_revenue ⇒ Object
Expected Revenue
54 55 56 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 54 def expected_revenue @expected_revenue end |
#hide_credit_card_non_ultracart_payments ⇒ Object
Internal flag to aid UI
57 58 59 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 57 def hide_credit_card_non_ultracart_payments @hide_credit_card_non_ultracart_payments end |
#hide_surcharge_amount ⇒ Object
Internal flag to aid UI
60 61 62 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 60 def hide_surcharge_amount @hide_surcharge_amount end |
#industry ⇒ Object
Industry
63 64 65 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 63 def industry @industry end |
#owner_email ⇒ Object
Owner email
66 67 68 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 66 def owner_email @owner_email end |
#owner_name ⇒ Object
Owner name
69 70 71 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 69 def owner_name @owner_name end |
#owner_phone ⇒ Object
Owner phone
72 73 74 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 72 def owner_phone @owner_phone end |
#postal_code ⇒ Object
Postal code
75 76 77 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 75 def postal_code @postal_code end |
#remove_pay_pal_pro ⇒ Object
Returns the value of attribute remove_pay_pal_pro.
77 78 79 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 77 def remove_pay_pal_pro @remove_pay_pal_pro end |
#restrictions ⇒ Object
Returns the value of attribute restrictions.
79 80 81 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 79 def restrictions @restrictions end |
#short_paypal_marketing_text ⇒ Object
Internal UI aid
82 83 84 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 82 def short_paypal_marketing_text @short_paypal_marketing_text end |
#show_ultracart_payments_disabled ⇒ Object
Internal flag to aid UI
85 86 87 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 85 def show_ultracart_payments_disabled @show_ultracart_payments_disabled end |
#show_ultracart_payments_intro ⇒ Object
Internal flag to aid UI
88 89 90 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 88 def show_ultracart_payments_intro @show_ultracart_payments_intro end |
#show_ultracart_payments_verification ⇒ Object
Internal flag to aid UI
91 92 93 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 91 def show_ultracart_payments_verification @show_ultracart_payments_verification end |
#show_ultracart_payments_verified ⇒ Object
Internal flag to aid UI
94 95 96 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 94 def show_ultracart_payments_verified @show_ultracart_payments_verified end |
#state ⇒ Object
State
97 98 99 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 97 def state @state end |
#website_url ⇒ Object
Website URL
100 101 102 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 100 def website_url @website_url end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 103 def self.attribute_map { :'accept_wepay' => :'accept_wepay', :'account_update_uri' => :'account_update_uri', :'address1' => :'address1', :'address2' => :'address2', :'canada_accept_debit_cards' => :'canada_accept_debit_cards', :'city' => :'city', :'company' => :'company', :'company_description' => :'company_description', :'console_hostname' => :'console_hostname', :'country' => :'country', :'credit_card_rate' => :'credit_card_rate', :'currency' => :'currency', :'expected_revenue' => :'expected_revenue', :'hide_credit_card_non_ultracart_payments' => :'hide_credit_card_non_ultracart_payments', :'hide_surcharge_amount' => :'hide_surcharge_amount', :'industry' => :'industry', :'owner_email' => :'owner_email', :'owner_name' => :'owner_name', :'owner_phone' => :'owner_phone', :'postal_code' => :'postal_code', :'remove_pay_pal_pro' => :'removePayPalPro', :'restrictions' => :'restrictions', :'short_paypal_marketing_text' => :'short_paypal_marketing_text', :'show_ultracart_payments_disabled' => :'show_ultracart_payments_disabled', :'show_ultracart_payments_intro' => :'show_ultracart_payments_intro', :'show_ultracart_payments_verification' => :'show_ultracart_payments_verification', :'show_ultracart_payments_verified' => :'show_ultracart_payments_verified', :'state' => :'state', :'website_url' => :'website_url' } end |
.swagger_types ⇒ Object
Attribute type mapping.
138 139 140 141 142 143 144 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 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 138 def self.swagger_types { :'accept_wepay' => :'BOOLEAN', :'account_update_uri' => :'String', :'address1' => :'String', :'address2' => :'String', :'canada_accept_debit_cards' => :'BOOLEAN', :'city' => :'String', :'company' => :'String', :'company_description' => :'String', :'console_hostname' => :'String', :'country' => :'String', :'credit_card_rate' => :'String', :'currency' => :'String', :'expected_revenue' => :'String', :'hide_credit_card_non_ultracart_payments' => :'BOOLEAN', :'hide_surcharge_amount' => :'BOOLEAN', :'industry' => :'String', :'owner_email' => :'String', :'owner_name' => :'String', :'owner_phone' => :'String', :'postal_code' => :'String', :'remove_pay_pal_pro' => :'BOOLEAN', :'restrictions' => :'PaymentsConfigurationRestrictions', :'short_paypal_marketing_text' => :'BOOLEAN', :'show_ultracart_payments_disabled' => :'BOOLEAN', :'show_ultracart_payments_intro' => :'BOOLEAN', :'show_ultracart_payments_verification' => :'BOOLEAN', :'show_ultracart_payments_verified' => :'BOOLEAN', :'state' => :'String', :'website_url' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 312 def ==(o) return true if self.equal?(o) self.class == o.class && accept_wepay == o.accept_wepay && account_update_uri == o.account_update_uri && address1 == o.address1 && address2 == o.address2 && canada_accept_debit_cards == o.canada_accept_debit_cards && city == o.city && company == o.company && company_description == o.company_description && console_hostname == o.console_hostname && country == o.country && credit_card_rate == o.credit_card_rate && currency == o.currency && expected_revenue == o.expected_revenue && hide_credit_card_non_ultracart_payments == o.hide_credit_card_non_ultracart_payments && hide_surcharge_amount == o.hide_surcharge_amount && industry == o.industry && owner_email == o.owner_email && owner_name == o.owner_name && owner_phone == o.owner_phone && postal_code == o.postal_code && remove_pay_pal_pro == o.remove_pay_pal_pro && restrictions == o.restrictions && short_paypal_marketing_text == o.short_paypal_marketing_text && show_ultracart_payments_disabled == o.show_ultracart_payments_disabled && show_ultracart_payments_intro == o.show_ultracart_payments_intro && show_ultracart_payments_verification == o.show_ultracart_payments_verification && show_ultracart_payments_verified == o.show_ultracart_payments_verified && state == o.state && website_url == o.website_url end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 382 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
448 449 450 451 452 453 454 455 456 457 458 459 460 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 448 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
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 361 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
348 349 350 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 348 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
354 355 356 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 354 def hash [accept_wepay, account_update_uri, address1, address2, canada_accept_debit_cards, city, company, company_description, console_hostname, country, credit_card_rate, currency, expected_revenue, hide_credit_card_non_ultracart_payments, hide_surcharge_amount, industry, owner_email, owner_name, owner_phone, postal_code, remove_pay_pal_pro, restrictions, short_paypal_marketing_text, show_ultracart_payments_disabled, show_ultracart_payments_intro, show_ultracart_payments_verification, show_ultracart_payments_verified, state, website_url].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
299 300 301 302 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 299 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
428 429 430 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 428 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
434 435 436 437 438 439 440 441 442 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 434 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
422 423 424 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 422 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
306 307 308 |
# File 'lib/ultracart_api/models/payments_configuration_we_pay.rb', line 306 def valid? true end |