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_authorisations ⇒ Object
Access to the service for bank_authorisation to make API calls.
-
#bank_details_lookups ⇒ Object
Access to the service for bank_details_lookup to make API calls.
-
#billing_request_flows ⇒ Object
Access to the service for billing_request_flow to make API calls.
-
#billing_request_templates ⇒ Object
Access to the service for billing_request_template to make API calls.
-
#billing_requests ⇒ Object
Access to the service for billing_request to make API calls.
-
#blocks ⇒ Object
Access to the service for block 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.
-
#exports ⇒ Object
Access to the service for export 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.
-
#institutions ⇒ Object
Access to the service for institution to make API calls.
-
#logos ⇒ Object
Access to the service for logo 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.
-
#negative_balance_limits ⇒ Object
Access to the service for negative_balance_limit to make API calls.
-
#payer_authorisations ⇒ Object
Access to the service for payer_authorisation to make API calls.
-
#payer_themes ⇒ Object
Access to the service for payer_theme 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.
-
#scenario_simulators ⇒ Object
Access to the service for scenario_simulator to make API calls.
-
#scheme_identifiers ⇒ Object
Access to the service for scheme_identifier 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.
-
#transferred_mandates ⇒ Object
Access to the service for transferred_mandate to make API calls.
-
#verification_details ⇒ Object
Access to the service for verification_detail to make API calls.
-
#webhooks ⇒ Object
Access to the service for webhook to make API calls.
Constructor Details
#initialize(options) ⇒ Client
Get a Client configured to use HTTP Basic authentication with the GC Api
196 197 198 199 200 201 202 |
# File 'lib/gocardless_pro/client.rb', line 196 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_authorisations ⇒ Object
Access to the service for bank_authorisation to make API calls
7 8 9 |
# File 'lib/gocardless_pro/client.rb', line 7 def @bank_authorisations ||= Services::BankAuthorisationsService.new(@api_service) end |
#bank_details_lookups ⇒ Object
Access to the service for bank_details_lookup to make API calls
12 13 14 |
# File 'lib/gocardless_pro/client.rb', line 12 def bank_details_lookups @bank_details_lookups ||= Services::BankDetailsLookupsService.new(@api_service) end |
#billing_request_flows ⇒ Object
Access to the service for billing_request_flow to make API calls
22 23 24 |
# File 'lib/gocardless_pro/client.rb', line 22 def billing_request_flows @billing_request_flows ||= Services::BillingRequestFlowsService.new(@api_service) end |
#billing_request_templates ⇒ Object
Access to the service for billing_request_template to make API calls
27 28 29 |
# File 'lib/gocardless_pro/client.rb', line 27 def billing_request_templates @billing_request_templates ||= Services::BillingRequestTemplatesService.new(@api_service) end |
#billing_requests ⇒ Object
Access to the service for billing_request to make API calls
17 18 19 |
# File 'lib/gocardless_pro/client.rb', line 17 def billing_requests @billing_requests ||= Services::BillingRequestsService.new(@api_service) end |
#blocks ⇒ Object
Access to the service for block to make API calls
32 33 34 |
# File 'lib/gocardless_pro/client.rb', line 32 def blocks @blocks ||= Services::BlocksService.new(@api_service) end |
#creditor_bank_accounts ⇒ Object
Access to the service for creditor_bank_account to make API calls
42 43 44 |
# File 'lib/gocardless_pro/client.rb', line 42 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
37 38 39 |
# File 'lib/gocardless_pro/client.rb', line 37 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
47 48 49 |
# File 'lib/gocardless_pro/client.rb', line 47 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
57 58 59 |
# File 'lib/gocardless_pro/client.rb', line 57 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
62 63 64 |
# File 'lib/gocardless_pro/client.rb', line 62 def customer_notifications @customer_notifications ||= Services::CustomerNotificationsService.new(@api_service) end |
#customers ⇒ Object
Access to the service for customer to make API calls
52 53 54 |
# File 'lib/gocardless_pro/client.rb', line 52 def customers @customers ||= Services::CustomersService.new(@api_service) end |
#events ⇒ Object
Access to the service for event to make API calls
67 68 69 |
# File 'lib/gocardless_pro/client.rb', line 67 def events @events ||= Services::EventsService.new(@api_service) end |
#exports ⇒ Object
Access to the service for export to make API calls
72 73 74 |
# File 'lib/gocardless_pro/client.rb', line 72 def exports @exports ||= Services::ExportsService.new(@api_service) end |
#instalment_schedules ⇒ Object
Access to the service for instalment_schedule to make API calls
77 78 79 |
# File 'lib/gocardless_pro/client.rb', line 77 def instalment_schedules @instalment_schedules ||= Services::InstalmentSchedulesService.new(@api_service) end |
#institutions ⇒ Object
Access to the service for institution to make API calls
82 83 84 |
# File 'lib/gocardless_pro/client.rb', line 82 def institutions @institutions ||= Services::InstitutionsService.new(@api_service) end |
#logos ⇒ Object
Access to the service for logo to make API calls
87 88 89 |
# File 'lib/gocardless_pro/client.rb', line 87 def logos @logos ||= Services::LogosService.new(@api_service) end |
#mandate_import_entries ⇒ Object
Access to the service for mandate_import_entry to make API calls
102 103 104 |
# File 'lib/gocardless_pro/client.rb', line 102 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
97 98 99 |
# File 'lib/gocardless_pro/client.rb', line 97 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
107 108 109 |
# File 'lib/gocardless_pro/client.rb', line 107 def mandate_pdfs @mandate_pdfs ||= Services::MandatePdfsService.new(@api_service) end |
#mandates ⇒ Object
Access to the service for mandate to make API calls
92 93 94 |
# File 'lib/gocardless_pro/client.rb', line 92 def mandates @mandates ||= Services::MandatesService.new(@api_service) end |
#negative_balance_limits ⇒ Object
Access to the service for negative_balance_limit to make API calls
112 113 114 |
# File 'lib/gocardless_pro/client.rb', line 112 def negative_balance_limits @negative_balance_limits ||= Services::NegativeBalanceLimitsService.new(@api_service) end |
#payer_authorisations ⇒ Object
Access to the service for payer_authorisation to make API calls
117 118 119 |
# File 'lib/gocardless_pro/client.rb', line 117 def @payer_authorisations ||= Services::PayerAuthorisationsService.new(@api_service) end |
#payer_themes ⇒ Object
Access to the service for payer_theme to make API calls
122 123 124 |
# File 'lib/gocardless_pro/client.rb', line 122 def payer_themes @payer_themes ||= Services::PayerThemesService.new(@api_service) end |
#payments ⇒ Object
Access to the service for payment to make API calls
127 128 129 |
# File 'lib/gocardless_pro/client.rb', line 127 def payments @payments ||= Services::PaymentsService.new(@api_service) end |
#payout_items ⇒ Object
Access to the service for payout_item to make API calls
137 138 139 |
# File 'lib/gocardless_pro/client.rb', line 137 def payout_items @payout_items ||= Services::PayoutItemsService.new(@api_service) end |
#payouts ⇒ Object
Access to the service for payout to make API calls
132 133 134 |
# File 'lib/gocardless_pro/client.rb', line 132 def payouts @payouts ||= Services::PayoutsService.new(@api_service) end |
#redirect_flows ⇒ Object
Access to the service for redirect_flow to make API calls
142 143 144 |
# File 'lib/gocardless_pro/client.rb', line 142 def redirect_flows @redirect_flows ||= Services::RedirectFlowsService.new(@api_service) end |
#refunds ⇒ Object
Access to the service for refund to make API calls
147 148 149 |
# File 'lib/gocardless_pro/client.rb', line 147 def refunds @refunds ||= Services::RefundsService.new(@api_service) end |
#scenario_simulators ⇒ Object
Access to the service for scenario_simulator to make API calls
152 153 154 |
# File 'lib/gocardless_pro/client.rb', line 152 def scenario_simulators @scenario_simulators ||= Services::ScenarioSimulatorsService.new(@api_service) end |
#scheme_identifiers ⇒ Object
Access to the service for scheme_identifier to make API calls
157 158 159 |
# File 'lib/gocardless_pro/client.rb', line 157 def scheme_identifiers @scheme_identifiers ||= Services::SchemeIdentifiersService.new(@api_service) end |
#subscriptions ⇒ Object
Access to the service for subscription to make API calls
162 163 164 |
# File 'lib/gocardless_pro/client.rb', line 162 def subscriptions @subscriptions ||= Services::SubscriptionsService.new(@api_service) end |
#tax_rates ⇒ Object
Access to the service for tax_rate to make API calls
167 168 169 |
# File 'lib/gocardless_pro/client.rb', line 167 def tax_rates @tax_rates ||= Services::TaxRatesService.new(@api_service) end |
#transferred_mandates ⇒ Object
Access to the service for transferred_mandate to make API calls
172 173 174 |
# File 'lib/gocardless_pro/client.rb', line 172 def transferred_mandates @transferred_mandates ||= Services::TransferredMandatesService.new(@api_service) end |
#verification_details ⇒ Object
Access to the service for verification_detail to make API calls
177 178 179 |
# File 'lib/gocardless_pro/client.rb', line 177 def verification_details @verification_details ||= Services::VerificationDetailsService.new(@api_service) end |
#webhooks ⇒ Object
Access to the service for webhook to make API calls
182 183 184 |
# File 'lib/gocardless_pro/client.rb', line 182 def webhooks @webhooks ||= Services::WebhooksService.new(@api_service) end |