Class: UltracartClient::PaymentsConfigurationPayPal
- Inherits:
-
Object
- Object
- UltracartClient::PaymentsConfigurationPayPal
- Defined in:
- lib/ultracart_api/models/payments_configuration_pay_pal.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#accept_paypal ⇒ Object
Master flag that determine if PayPal is an active payment for this account.
-
#accounting_code ⇒ Object
Optional accounting code that is set to Quickbooks when an order uses this payment method.
-
#api_password ⇒ Object
PayPal API password.
-
#api_username ⇒ Object
PayPal API username.
-
#certificate_on_file ⇒ Object
(Legacy) true if there is a PayPal certificate already on file.
-
#deposit_to_account ⇒ Object
The account to deposit funds.
-
#email ⇒ Object
The main PayPal email address.
-
#environment ⇒ Object
PayPal configuration, live or sandbox.
-
#header_image_url ⇒ Object
The URL for the PayPal header.
-
#hide_bill_me_later ⇒ Object
True if the Bill Me Later button should be hidden during checkout.
-
#hide_express_checkout_on_view_cart ⇒ Object
True if the PayPal express checkout button should be hidden on the view cart page.
-
#hide_for_unshipped_orders ⇒ Object
True if PayPal should be hidden for orders with no shippable product, such as digital orders.
-
#hold_in_ar ⇒ Object
If true, PayPal orders are held in Accounts Receivable for review.
-
#landing_page ⇒ Object
PayPal landing page.
-
#mode ⇒ Object
The PayPal mode.
-
#private_key_password ⇒ Object
PayPal API private key password.
-
#processing_fee ⇒ Object
Optional additional fee to charge if PayPal is used.
-
#processing_percentage ⇒ Object
The processing percentage charged by PayPal.
-
#push_paypal ⇒ Object
True if the internal UI should recommend opening a PayPal account.
-
#restrictions ⇒ Object
Returns the value of attribute restrictions.
-
#send_recurring ⇒ Object
True if UltraCart should send recurring orders to PayPal.
-
#short_paypal_marketing_text ⇒ Object
Short marketing text.
-
#show_card_logos_not_directly_supported ⇒ Object
internal ui flag.
-
#show_signature ⇒ Object
Internal flag used to manage UI.
-
#signature ⇒ Object
PayPal signature.
-
#solution_type ⇒ Object
PayPal solution type.
-
#summary_email ⇒ Object
The email where PayPal summaries should be sent.
-
#summary_mode ⇒ Object
Description of what mode PayPal is operating.
-
#zero_dollar_penny ⇒ Object
Send free items to PayPal as one cent items and subtract this penny from shipping.
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 = {}) ⇒ PaymentsConfigurationPayPal
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 = {}) ⇒ PaymentsConfigurationPayPal
Initializes the object
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 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 197 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_paypal') self.accept_paypal = attributes[:'accept_paypal'] end if attributes.has_key?(:'accounting_code') self.accounting_code = attributes[:'accounting_code'] end if attributes.has_key?(:'api_password') self.api_password = attributes[:'api_password'] end if attributes.has_key?(:'api_username') self.api_username = attributes[:'api_username'] end if attributes.has_key?(:'certificate_on_file') self.certificate_on_file = attributes[:'certificate_on_file'] end if attributes.has_key?(:'deposit_to_account') self.deposit_to_account = attributes[:'deposit_to_account'] end if attributes.has_key?(:'email') self.email = attributes[:'email'] end if attributes.has_key?(:'environment') self.environment = attributes[:'environment'] end if attributes.has_key?(:'header_image_url') self.header_image_url = attributes[:'header_image_url'] end if attributes.has_key?(:'hide_bill_me_later') self.hide_bill_me_later = attributes[:'hide_bill_me_later'] end if attributes.has_key?(:'hide_express_checkout_on_view_cart') self.hide_express_checkout_on_view_cart = attributes[:'hide_express_checkout_on_view_cart'] end if attributes.has_key?(:'hide_for_unshipped_orders') self.hide_for_unshipped_orders = attributes[:'hide_for_unshipped_orders'] end if attributes.has_key?(:'hold_in_ar') self.hold_in_ar = attributes[:'hold_in_ar'] end if attributes.has_key?(:'landing_page') self.landing_page = attributes[:'landing_page'] end if attributes.has_key?(:'mode') self.mode = attributes[:'mode'] end if attributes.has_key?(:'private_key_password') self.private_key_password = attributes[:'private_key_password'] end if attributes.has_key?(:'processing_fee') self.processing_fee = attributes[:'processing_fee'] end if attributes.has_key?(:'processing_percentage') self.processing_percentage = attributes[:'processing_percentage'] end if attributes.has_key?(:'push_paypal') self.push_paypal = attributes[:'push_paypal'] end if attributes.has_key?(:'restrictions') self.restrictions = attributes[:'restrictions'] end if attributes.has_key?(:'send_recurring') self.send_recurring = attributes[:'send_recurring'] 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_card_logos_not_directly_supported') self.show_card_logos_not_directly_supported = attributes[:'show_card_logos_not_directly_supported'] end if attributes.has_key?(:'show_signature') self.show_signature = attributes[:'show_signature'] end if attributes.has_key?(:'signature') self.signature = attributes[:'signature'] end if attributes.has_key?(:'solution_type') self.solution_type = attributes[:'solution_type'] end if attributes.has_key?(:'summary_email') self.summary_email = attributes[:'summary_email'] end if attributes.has_key?(:'summary_mode') self.summary_mode = attributes[:'summary_mode'] end if attributes.has_key?(:'zero_dollar_penny') self.zero_dollar_penny = attributes[:'zero_dollar_penny'] end end |
Instance Attribute Details
#accept_paypal ⇒ Object
Master flag that determine if PayPal is an active payment for this account
18 19 20 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 18 def accept_paypal @accept_paypal end |
#accounting_code ⇒ Object
Optional accounting code that is set to Quickbooks when an order uses this payment method.
21 22 23 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 21 def accounting_code @accounting_code end |
#api_password ⇒ Object
PayPal API password
24 25 26 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 24 def api_password @api_password end |
#api_username ⇒ Object
PayPal API username
27 28 29 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 27 def api_username @api_username end |
#certificate_on_file ⇒ Object
(Legacy) true if there is a PayPal certificate already on file. Used to manage the internal UI
30 31 32 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 30 def certificate_on_file @certificate_on_file end |
#deposit_to_account ⇒ Object
The account to deposit funds
33 34 35 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 33 def deposit_to_account @deposit_to_account end |
#email ⇒ Object
The main PayPal email address
36 37 38 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 36 def email @email end |
#environment ⇒ Object
PayPal configuration, live or sandbox
39 40 41 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 39 def environment @environment end |
#header_image_url ⇒ Object
The URL for the PayPal header
42 43 44 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 42 def header_image_url @header_image_url end |
#hide_bill_me_later ⇒ Object
True if the Bill Me Later button should be hidden during checkout
45 46 47 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 45 def hide_bill_me_later @hide_bill_me_later end |
#hide_express_checkout_on_view_cart ⇒ Object
True if the PayPal express checkout button should be hidden on the view cart page. This will force the customer to enter address information before being able to checkout with PayPal
48 49 50 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 48 def hide_express_checkout_on_view_cart @hide_express_checkout_on_view_cart end |
#hide_for_unshipped_orders ⇒ Object
True if PayPal should be hidden for orders with no shippable product, such as digital orders
51 52 53 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 51 def hide_for_unshipped_orders @hide_for_unshipped_orders end |
#hold_in_ar ⇒ Object
If true, PayPal orders are held in Accounts Receivable for review
54 55 56 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 54 def hold_in_ar @hold_in_ar end |
#landing_page ⇒ Object
PayPal landing page
57 58 59 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 57 def landing_page @landing_page end |
#mode ⇒ Object
The PayPal mode
60 61 62 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 60 def mode @mode end |
#private_key_password ⇒ Object
PayPal API private key password
63 64 65 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 63 def private_key_password @private_key_password end |
#processing_fee ⇒ Object
Optional additional fee to charge if PayPal is used. It is rare for this to be used.
66 67 68 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 66 def processing_fee @processing_fee end |
#processing_percentage ⇒ Object
The processing percentage charged by PayPal
69 70 71 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 69 def processing_percentage @processing_percentage end |
#push_paypal ⇒ Object
True if the internal UI should recommend opening a PayPal account
72 73 74 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 72 def push_paypal @push_paypal end |
#restrictions ⇒ Object
Returns the value of attribute restrictions.
74 75 76 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 74 def restrictions @restrictions end |
#send_recurring ⇒ Object
True if UltraCart should send recurring orders to PayPal. There are restrictions to what PayPal will accept for recurring orders. Be careful.
77 78 79 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 77 def send_recurring @send_recurring end |
#short_paypal_marketing_text ⇒ Object
Short marketing text
80 81 82 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 80 def short_paypal_marketing_text @short_paypal_marketing_text end |
#show_card_logos_not_directly_supported ⇒ Object
internal ui flag
83 84 85 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 83 def show_card_logos_not_directly_supported @show_card_logos_not_directly_supported end |
#show_signature ⇒ Object
Internal flag used to manage UI
86 87 88 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 86 def show_signature @show_signature end |
#signature ⇒ Object
PayPal signature
89 90 91 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 89 def signature @signature end |
#solution_type ⇒ Object
PayPal solution type
92 93 94 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 92 def solution_type @solution_type end |
#summary_email ⇒ Object
The email where PayPal summaries should be sent
95 96 97 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 95 def summary_email @summary_email end |
#summary_mode ⇒ Object
Description of what mode PayPal is operating
98 99 100 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 98 def summary_mode @summary_mode end |
#zero_dollar_penny ⇒ Object
Send free items to PayPal as one cent items and subtract this penny from shipping. PayPal does not allow the sale of free items.
101 102 103 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 101 def zero_dollar_penny @zero_dollar_penny end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 156 157 158 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 126 def self.attribute_map { :'accept_paypal' => :'accept_paypal', :'accounting_code' => :'accounting_code', :'api_password' => :'api_password', :'api_username' => :'api_username', :'certificate_on_file' => :'certificate_on_file', :'deposit_to_account' => :'deposit_to_account', :'email' => :'email', :'environment' => :'environment', :'header_image_url' => :'header_image_url', :'hide_bill_me_later' => :'hide_bill_me_later', :'hide_express_checkout_on_view_cart' => :'hide_express_checkout_on_view_cart', :'hide_for_unshipped_orders' => :'hide_for_unshipped_orders', :'hold_in_ar' => :'hold_in_ar', :'landing_page' => :'landing_page', :'mode' => :'mode', :'private_key_password' => :'private_key_password', :'processing_fee' => :'processing_fee', :'processing_percentage' => :'processing_percentage', :'push_paypal' => :'push_paypal', :'restrictions' => :'restrictions', :'send_recurring' => :'send_recurring', :'short_paypal_marketing_text' => :'short_paypal_marketing_text', :'show_card_logos_not_directly_supported' => :'show_card_logos_not_directly_supported', :'show_signature' => :'show_signature', :'signature' => :'signature', :'solution_type' => :'solution_type', :'summary_email' => :'summary_email', :'summary_mode' => :'summary_mode', :'zero_dollar_penny' => :'zero_dollar_penny' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 161 def self.swagger_types { :'accept_paypal' => :'BOOLEAN', :'accounting_code' => :'String', :'api_password' => :'String', :'api_username' => :'String', :'certificate_on_file' => :'BOOLEAN', :'deposit_to_account' => :'String', :'email' => :'String', :'environment' => :'String', :'header_image_url' => :'String', :'hide_bill_me_later' => :'BOOLEAN', :'hide_express_checkout_on_view_cart' => :'BOOLEAN', :'hide_for_unshipped_orders' => :'BOOLEAN', :'hold_in_ar' => :'BOOLEAN', :'landing_page' => :'String', :'mode' => :'String', :'private_key_password' => :'String', :'processing_fee' => :'Float', :'processing_percentage' => :'Float', :'push_paypal' => :'BOOLEAN', :'restrictions' => :'PaymentsConfigurationRestrictions', :'send_recurring' => :'BOOLEAN', :'short_paypal_marketing_text' => :'BOOLEAN', :'show_card_logos_not_directly_supported' => :'BOOLEAN', :'show_signature' => :'BOOLEAN', :'signature' => :'String', :'solution_type' => :'String', :'summary_email' => :'String', :'summary_mode' => :'String', :'zero_dollar_penny' => :'BOOLEAN' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 383 def ==(o) return true if self.equal?(o) self.class == o.class && accept_paypal == o.accept_paypal && accounting_code == o.accounting_code && api_password == o.api_password && api_username == o.api_username && certificate_on_file == o.certificate_on_file && deposit_to_account == o.deposit_to_account && email == o.email && environment == o.environment && header_image_url == o.header_image_url && hide_bill_me_later == o.hide_bill_me_later && hide_express_checkout_on_view_cart == o.hide_express_checkout_on_view_cart && hide_for_unshipped_orders == o.hide_for_unshipped_orders && hold_in_ar == o.hold_in_ar && landing_page == o.landing_page && mode == o.mode && private_key_password == o.private_key_password && processing_fee == o.processing_fee && processing_percentage == o.processing_percentage && push_paypal == o.push_paypal && restrictions == o.restrictions && send_recurring == o.send_recurring && short_paypal_marketing_text == o.short_paypal_marketing_text && show_card_logos_not_directly_supported == o.show_card_logos_not_directly_supported && show_signature == o.show_signature && signature == o.signature && solution_type == o.solution_type && summary_email == o.summary_email && summary_mode == o.summary_mode && zero_dollar_penny == o.zero_dollar_penny end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 484 485 486 487 488 489 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 453 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
519 520 521 522 523 524 525 526 527 528 529 530 531 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 519 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
432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 432 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
419 420 421 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 419 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
425 426 427 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 425 def hash [accept_paypal, accounting_code, api_password, api_username, certificate_on_file, deposit_to_account, email, environment, header_image_url, hide_bill_me_later, hide_express_checkout_on_view_cart, hide_for_unshipped_orders, hold_in_ar, landing_page, mode, private_key_password, processing_fee, processing_percentage, push_paypal, restrictions, send_recurring, short_paypal_marketing_text, show_card_logos_not_directly_supported, show_signature, signature, solution_type, summary_email, summary_mode, zero_dollar_penny].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
322 323 324 325 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 322 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
499 500 501 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 499 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
505 506 507 508 509 510 511 512 513 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 505 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
493 494 495 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 493 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/ultracart_api/models/payments_configuration_pay_pal.rb', line 329 def valid? environment_validator = EnumAttributeValidator.new('String', ['Live', 'Sandbox']) return false unless environment_validator.valid?(@environment) landing_page_validator = EnumAttributeValidator.new('String', ['Billing', 'Login']) return false unless landing_page_validator.valid?(@landing_page) mode_validator = EnumAttributeValidator.new('String', ['WPPECO', 'WPPECDP']) return false unless mode_validator.valid?(@mode) solution_type_validator = EnumAttributeValidator.new('String', ['Sole', 'Mark']) return false unless solution_type_validator.valid?(@solution_type) true end |