Class: GoCardlessPro::Client
- Inherits:
-
Object
- Object
- GoCardlessPro::Client
- Extended by:
- Forwardable
- Defined in:
- lib/gocardless_pro/client.rb
Overview
A class for working with and talking to the GoCardless API
Instance Method Summary collapse
-
#bank_details_lookups ⇒ Object
Access to the service for bank_details_lookup to make API calls.
-
#creditor_bank_accounts ⇒ Object
Access to the service for creditor_bank_account to make API calls.
-
#creditors ⇒ Object
Access to the service for creditor to make API calls.
-
#currency_exchange_rates ⇒ Object
Access to the service for currency_exchange_rate to make API calls.
-
#customer_bank_accounts ⇒ Object
Access to the service for customer_bank_account to make API calls.
-
#customer_notifications ⇒ Object
Access to the service for customer_notification to make API calls.
-
#customers ⇒ Object
Access to the service for customer to make API calls.
-
#events ⇒ Object
Access to the service for event to make API calls.
-
#initialize(options) ⇒ Client
constructor
Get a Client configured to use HTTP Basic authentication with the GC Api.
-
#instalment_schedules ⇒ Object
Access to the service for instalment_schedule to make API calls.
-
#mandate_import_entries ⇒ Object
Access to the service for mandate_import_entry to make API calls.
-
#mandate_imports ⇒ Object
Access to the service for mandate_import to make API calls.
-
#mandate_pdfs ⇒ Object
Access to the service for mandate_pdf to make API calls.
-
#mandates ⇒ Object
Access to the service for mandate to make API calls.
-
#payer_authorisations ⇒ Object
Access to the service for payer_authorisation to make API calls.
-
#payments ⇒ Object
Access to the service for payment to make API calls.
-
#payout_items ⇒ Object
Access to the service for payout_item to make API calls.
-
#payouts ⇒ Object
Access to the service for payout to make API calls.
-
#redirect_flows ⇒ Object
Access to the service for redirect_flow to make API calls.
-
#refunds ⇒ Object
Access to the service for refund to make API calls.
-
#subscriptions ⇒ Object
Access to the service for subscription to make API calls.
-
#tax_rates ⇒ Object
Access to the service for tax_rate to make API calls.
Constructor Details
#initialize(options) ⇒ Client
Get a Client configured to use HTTP Basic authentication with the GC Api
121 122 123 124 125 126 127 |
# File 'lib/gocardless_pro/client.rb', line 121 def initialize() access_token = .delete(:access_token) || raise('No Access Token given to GoCardless Client') environment = .delete(:environment) || :live url = .delete(:url) || url_for_environment(environment) = () @api_service = ApiService.new(url, access_token, ) end |
Instance Method Details
#bank_details_lookups ⇒ Object
Access to the service for bank_details_lookup to make API calls
7 8 9 |
# File 'lib/gocardless_pro/client.rb', line 7 def bank_details_lookups @bank_details_lookups ||= Services::BankDetailsLookupsService.new(@api_service) end |
#creditor_bank_accounts ⇒ Object
Access to the service for creditor_bank_account to make API calls
17 18 19 |
# File 'lib/gocardless_pro/client.rb', line 17 def creditor_bank_accounts @creditor_bank_accounts ||= Services::CreditorBankAccountsService.new(@api_service) end |
#creditors ⇒ Object
Access to the service for creditor to make API calls
12 13 14 |
# File 'lib/gocardless_pro/client.rb', line 12 def creditors @creditors ||= Services::CreditorsService.new(@api_service) end |
#currency_exchange_rates ⇒ Object
Access to the service for currency_exchange_rate to make API calls
22 23 24 |
# File 'lib/gocardless_pro/client.rb', line 22 def currency_exchange_rates @currency_exchange_rates ||= Services::CurrencyExchangeRatesService.new(@api_service) end |
#customer_bank_accounts ⇒ Object
Access to the service for customer_bank_account to make API calls
32 33 34 |
# File 'lib/gocardless_pro/client.rb', line 32 def customer_bank_accounts @customer_bank_accounts ||= Services::CustomerBankAccountsService.new(@api_service) end |
#customer_notifications ⇒ Object
Access to the service for customer_notification to make API calls
37 38 39 |
# File 'lib/gocardless_pro/client.rb', line 37 def customer_notifications @customer_notifications ||= Services::CustomerNotificationsService.new(@api_service) end |
#customers ⇒ Object
Access to the service for customer to make API calls
27 28 29 |
# File 'lib/gocardless_pro/client.rb', line 27 def customers @customers ||= Services::CustomersService.new(@api_service) end |
#events ⇒ Object
Access to the service for event to make API calls
42 43 44 |
# File 'lib/gocardless_pro/client.rb', line 42 def events @events ||= Services::EventsService.new(@api_service) end |
#instalment_schedules ⇒ Object
Access to the service for instalment_schedule to make API calls
47 48 49 |
# File 'lib/gocardless_pro/client.rb', line 47 def instalment_schedules @instalment_schedules ||= Services::InstalmentSchedulesService.new(@api_service) end |
#mandate_import_entries ⇒ Object
Access to the service for mandate_import_entry to make API calls
62 63 64 |
# File 'lib/gocardless_pro/client.rb', line 62 def mandate_import_entries @mandate_import_entries ||= Services::MandateImportEntriesService.new(@api_service) end |
#mandate_imports ⇒ Object
Access to the service for mandate_import to make API calls
57 58 59 |
# File 'lib/gocardless_pro/client.rb', line 57 def mandate_imports @mandate_imports ||= Services::MandateImportsService.new(@api_service) end |
#mandate_pdfs ⇒ Object
Access to the service for mandate_pdf to make API calls
67 68 69 |
# File 'lib/gocardless_pro/client.rb', line 67 def mandate_pdfs @mandate_pdfs ||= Services::MandatePdfsService.new(@api_service) end |
#mandates ⇒ Object
Access to the service for mandate to make API calls
52 53 54 |
# File 'lib/gocardless_pro/client.rb', line 52 def mandates @mandates ||= Services::MandatesService.new(@api_service) end |
#payer_authorisations ⇒ Object
Access to the service for payer_authorisation to make API calls
72 73 74 |
# File 'lib/gocardless_pro/client.rb', line 72 def @payer_authorisations ||= Services::PayerAuthorisationsService.new(@api_service) end |
#payments ⇒ Object
Access to the service for payment to make API calls
77 78 79 |
# File 'lib/gocardless_pro/client.rb', line 77 def payments @payments ||= Services::PaymentsService.new(@api_service) end |
#payout_items ⇒ Object
Access to the service for payout_item to make API calls
87 88 89 |
# File 'lib/gocardless_pro/client.rb', line 87 def payout_items @payout_items ||= Services::PayoutItemsService.new(@api_service) end |
#payouts ⇒ Object
Access to the service for payout to make API calls
82 83 84 |
# File 'lib/gocardless_pro/client.rb', line 82 def payouts @payouts ||= Services::PayoutsService.new(@api_service) end |
#redirect_flows ⇒ Object
Access to the service for redirect_flow to make API calls
92 93 94 |
# File 'lib/gocardless_pro/client.rb', line 92 def redirect_flows @redirect_flows ||= Services::RedirectFlowsService.new(@api_service) end |
#refunds ⇒ Object
Access to the service for refund to make API calls
97 98 99 |
# File 'lib/gocardless_pro/client.rb', line 97 def refunds @refunds ||= Services::RefundsService.new(@api_service) end |
#subscriptions ⇒ Object
Access to the service for subscription to make API calls
102 103 104 |
# File 'lib/gocardless_pro/client.rb', line 102 def subscriptions @subscriptions ||= Services::SubscriptionsService.new(@api_service) end |
#tax_rates ⇒ Object
Access to the service for tax_rate to make API calls
107 108 109 |
# File 'lib/gocardless_pro/client.rb', line 107 def tax_rates @tax_rates ||= Services::TaxRatesService.new(@api_service) end |