Class: FlexCommerce::PaypalExpress::Process::PaypalParams
- Inherits:
-
Object
- Object
- FlexCommerce::PaypalExpress::Process::PaypalParams
- Includes:
- Api
- Defined in:
- lib/paypal_express/process/paypal_params.rb
Constant Summary collapse
- DEFAULT_DESCRIPTION =
"Shift Commerce Order".freeze
Constants included from Api
Instance Attribute Summary collapse
-
#allow_shipping_change ⇒ Object
Returns the value of attribute allow_shipping_change.
-
#callback_url ⇒ Object
Returns the value of attribute callback_url.
-
#cancel_url ⇒ Object
Returns the value of attribute cancel_url.
-
#cart ⇒ Object
Returns the value of attribute cart.
-
#description ⇒ Object
Returns the value of attribute description.
-
#ip_address ⇒ Object
Returns the value of attribute ip_address.
-
#shipping_method_model ⇒ Object
Returns the value of attribute shipping_method_model.
-
#success_url ⇒ Object
Returns the value of attribute success_url.
-
#use_mobile_payments ⇒ Object
Returns the value of attribute use_mobile_payments.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(cart:, success_url:, cancel_url:, ip_address:, allow_shipping_change: true, callback_url:, shipping_method_model: FlexCommerce::ShippingMethod, use_mobile_payments: false, description:) ⇒ PaypalParams
constructor
A new instance of PaypalParams.
Constructor Details
#initialize(cart:, success_url:, cancel_url:, ip_address:, allow_shipping_change: true, callback_url:, shipping_method_model: FlexCommerce::ShippingMethod, use_mobile_payments: false, description:) ⇒ PaypalParams
Returns a new instance of PaypalParams.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/paypal_express/process/paypal_params.rb', line 27 def initialize(cart:,success_url:, cancel_url:, ip_address:, allow_shipping_change: true, callback_url:, shipping_method_model: FlexCommerce::ShippingMethod, use_mobile_payments: false, description:) self.cart = cart self.allow_shipping_change = allow_shipping_change self.success_url = success_url self.cancel_url = cancel_url self.ip_address = ip_address self.callback_url = callback_url self.shipping_method_model = shipping_method_model self.use_mobile_payments = use_mobile_payments self.description = description end |
Instance Attribute Details
#allow_shipping_change ⇒ Object
Returns the value of attribute allow_shipping_change.
47 48 49 |
# File 'lib/paypal_express/process/paypal_params.rb', line 47 def allow_shipping_change @allow_shipping_change end |
#callback_url ⇒ Object
Returns the value of attribute callback_url.
47 48 49 |
# File 'lib/paypal_express/process/paypal_params.rb', line 47 def callback_url @callback_url end |
#cancel_url ⇒ Object
Returns the value of attribute cancel_url.
47 48 49 |
# File 'lib/paypal_express/process/paypal_params.rb', line 47 def cancel_url @cancel_url end |
#cart ⇒ Object
Returns the value of attribute cart.
47 48 49 |
# File 'lib/paypal_express/process/paypal_params.rb', line 47 def cart @cart end |
#description ⇒ Object
Returns the value of attribute description.
47 48 49 |
# File 'lib/paypal_express/process/paypal_params.rb', line 47 def description @description end |
#ip_address ⇒ Object
Returns the value of attribute ip_address.
47 48 49 |
# File 'lib/paypal_express/process/paypal_params.rb', line 47 def ip_address @ip_address end |
#shipping_method_model ⇒ Object
Returns the value of attribute shipping_method_model.
47 48 49 |
# File 'lib/paypal_express/process/paypal_params.rb', line 47 def shipping_method_model @shipping_method_model end |
#success_url ⇒ Object
Returns the value of attribute success_url.
47 48 49 |
# File 'lib/paypal_express/process/paypal_params.rb', line 47 def success_url @success_url end |
#use_mobile_payments ⇒ Object
Returns the value of attribute use_mobile_payments.
47 48 49 |
# File 'lib/paypal_express/process/paypal_params.rb', line 47 def use_mobile_payments @use_mobile_payments end |
Instance Method Details
#call ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/paypal_express/process/paypal_params.rb', line 39 def call base_paypal_params .merge(paypal_shipping_address_params) .merge(paypal_items) .merge(ui_callback_params) .merge() end |