Class: PayPro::Client
- Inherits:
-
Object
- Object
- PayPro::Client
- Defined in:
- lib/pay_pro/client.rb
Instance Attribute Summary collapse
-
#chargebacks ⇒ Object
readonly
Returns the value of attribute chargebacks.
-
#config ⇒ Object
Returns the value of attribute config.
-
#customers ⇒ Object
readonly
Returns the value of attribute customers.
-
#events ⇒ Object
readonly
Returns the value of attribute events.
-
#installment_plan_periods ⇒ Object
readonly
Returns the value of attribute installment_plan_periods.
-
#installment_plans ⇒ Object
readonly
Returns the value of attribute installment_plans.
-
#mandates ⇒ Object
readonly
Returns the value of attribute mandates.
-
#pay_methods ⇒ Object
readonly
Returns the value of attribute pay_methods.
-
#payments ⇒ Object
readonly
Returns the value of attribute payments.
-
#refunds ⇒ Object
readonly
Returns the value of attribute refunds.
-
#subscription_periods ⇒ Object
readonly
Returns the value of attribute subscription_periods.
-
#subscriptions ⇒ Object
readonly
Returns the value of attribute subscriptions.
-
#webhooks ⇒ Object
readonly
Returns the value of attribute webhooks.
Instance Method Summary collapse
-
#initialize(config = {}) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(config = {}) ⇒ Client
Returns a new instance of Client.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/pay_pro/client.rb', line 20 def initialize(config = {}) @config = case config when Hash PayPro.config.merge(config) when String PayPro.config.merge(api_key: config) when PayPro::Config config else raise ConfigurationError.new(message: "Invalid argument: #{config}") end check_api_key! setup_endpoints end |
Instance Attribute Details
#chargebacks ⇒ Object (readonly)
Returns the value of attribute chargebacks.
7 8 9 |
# File 'lib/pay_pro/client.rb', line 7 def chargebacks @chargebacks end |
#config ⇒ Object
Returns the value of attribute config.
5 6 7 |
# File 'lib/pay_pro/client.rb', line 5 def config @config end |
#customers ⇒ Object (readonly)
Returns the value of attribute customers.
7 8 9 |
# File 'lib/pay_pro/client.rb', line 7 def customers @customers end |
#events ⇒ Object (readonly)
Returns the value of attribute events.
7 8 9 |
# File 'lib/pay_pro/client.rb', line 7 def events @events end |
#installment_plan_periods ⇒ Object (readonly)
Returns the value of attribute installment_plan_periods.
7 8 9 |
# File 'lib/pay_pro/client.rb', line 7 def installment_plan_periods @installment_plan_periods end |
#installment_plans ⇒ Object (readonly)
Returns the value of attribute installment_plans.
7 8 9 |
# File 'lib/pay_pro/client.rb', line 7 def installment_plans @installment_plans end |
#mandates ⇒ Object (readonly)
Returns the value of attribute mandates.
7 8 9 |
# File 'lib/pay_pro/client.rb', line 7 def mandates @mandates end |
#pay_methods ⇒ Object (readonly)
Returns the value of attribute pay_methods.
7 8 9 |
# File 'lib/pay_pro/client.rb', line 7 def pay_methods @pay_methods end |
#payments ⇒ Object (readonly)
Returns the value of attribute payments.
7 8 9 |
# File 'lib/pay_pro/client.rb', line 7 def payments @payments end |
#refunds ⇒ Object (readonly)
Returns the value of attribute refunds.
7 8 9 |
# File 'lib/pay_pro/client.rb', line 7 def refunds @refunds end |
#subscription_periods ⇒ Object (readonly)
Returns the value of attribute subscription_periods.
7 8 9 |
# File 'lib/pay_pro/client.rb', line 7 def subscription_periods @subscription_periods end |
#subscriptions ⇒ Object (readonly)
Returns the value of attribute subscriptions.
7 8 9 |
# File 'lib/pay_pro/client.rb', line 7 def subscriptions @subscriptions end |
#webhooks ⇒ Object (readonly)
Returns the value of attribute webhooks.
7 8 9 |
# File 'lib/pay_pro/client.rb', line 7 def webhooks @webhooks end |