The new Dwolla API V2 SDK, as generated by this fork of swagger-codegen.
1.0.18
DwollaSwagger is available on Packagist, and can therefore be installed with Composer.
composer require dwolla/dwollaswagger
composer install
To use, just require your composer autoload.php file.
require('../path/to/vendor/autoload.php');DwollaSwagger makes it easy for developers to hit the ground running with our API. Before attempting the following, you should ideally create an application key and secret.
To get started, all you need to set is the access_token and host values.
DwollaSwagger\Configuration::$access_token = 'a token';
# For Sandbox
$apiClient = new DwollaSwagger\ApiClient("https://api-sandbox.dwolla.com/");
# For production
$apiClient = new DwollaSwagger\ApiClient("https://api.dwolla.com");Now that we've set up our client, we can use it to make requests to the API. Let's retrieve 10 customer records associated with the authorization token used.
DwollaSwagger\Configuration::$access_token = 'a token';
$apiClient = new DwollaSwagger\ApiClient("https://api-sandbox.dwolla.com/");
$customersApi = new DwollaSwagger\CustomersApi($apiClient);
$myCusties = $customersApi->_list(10);To create a customer, we can either provide an (associative) array with the expected values, or a CreateCustomer object.
$location = $customersApi->create([
'firstName' => 'Jennifer',
'lastName' => 'Smith',
'email' => 'jsmith@gmail.com',
'phone' => '7188675309'
]);$jenny = new DwollaSwagger\CreateCustomer();
$jenny->firstName = 'Jennifer';
$jenny->lastName = 'Smith';
$jenny->email = 'jsmith@gmail.com';
$jenny->phone = '7188675309'
$location = $customersApi->create($jenny);$location will contain a URL to your newly created resource (HTTP 201 / Location header).
DwollaSwagger contains API modules which allow the user to make requests, as well as models which are DAOs that the library uses to serialize responses.
Each API module is named in accordance to (Dwolla's API Spec and encapsulates all of the documented functionality.
AccountsApiBusinessclassificationsApiCustomersApiDocumentsApiEventsApiFundingsourcesApiMasspaymentitemsApiMasspaymentsApiOndemandauthorizationsApiRootApiSandboxApiTransfersApiWebhooksApiWebhooksubscriptionsApi
API objects take an ApiClient argument, which you created [here](##Configuring a client).
$documentsApi = new DwollaSwagger\DocumentsApi($apiClient);Each model represents the different kinds of requests and responses that can be made with the Dwolla API.
AccountInfoAmountApplicationEventBaseObjectBusinessClassificationBusinessClassificationListResponseCreateCustomerCreateFundingSourceRequestCreateWebhookCustomerCustomerListResponseDocumentDocumentListResponseEventListResponseFundingSourceFundingSourceListResponseHalLinkMoneyTransferTransferListResponseTransferRequestBodyUnitUpdateCustomerVerificationTokenVerifyMicroDepositsRequestWebhookWebhookAttemptWebhookEventListResponseWebhookHeaderWebhookHttpRequestWebhookHttpResponseWebhookListResponseWebhookRetryWebhookRetryRequestListResponseWebhookSubscription
1.0.18
- Patch controller in CreateCustomer model.
1.0.17
- API schema updated,
CustomersApiupdated to support beneficial owner related endpoints, as well as support added for status filter on Customer search. - New
BeneficialownersApi. - Existing
CreateCustomer,CreateFundingSourceRequest,Customer,FundingSourceBalance,TransferFailure, andUpdateCustomermodels updated. - New
Address,BeneficialOwnerListResponse,CertifyRequest,CreateOwnerRequest,FullAccountInfo,Owner,Ownership,Passport, andUpdateOwnerRequestmodels.
1.0.16
- API schema updated,
FundingsourcesApiupdated to support update a funding source.MasspaymentsApiandMasspaymentitemsApiupdated to support filtering by correlationId. - New
SandboxApiwhich is used to simulate bank transfer processing in the Sandbox. - Existing
CreateFundingSourceRequest,FundingSource,MassPayment,MassPaymentItem,MassPaymentItemRequestBody,MassPaymentRequestBody,Transfer,TransferFailure, andTransferRequestBodymodels updated. - New
ProcessResult,UpdateBankRequest, andUpdateJobRequestBodymodels.
1.0.15
- Optional parameters set to null.
1.0.14
- Trim trailing slash from host url on initialization.
1.0.13
- Add control over IPV4 and V6 connections.
1.0.12
- API schema updated,
CustomersApiupdated to allow for null limit, offset, and search. ExistingCreateFundingSourceRequest,FundingSource,HalLink,MicroDepositsInitiated,Transfer, andTransferRequestBodymodels updated. NewClearingandFailureDetailsmodels. - Fix README example for creating a Customer.
1.0.11
- API schema updated,
WebhooksubscriptionsApisupports pause a webhook subscription.FundingsourcesApicontains support forremovedparameter on list funding sources. - Fix getFeesBySource to support deserialization with new
FeesBySourceResponsemodel.
1.0.10
- Patch soft delete to deserialize with FundingSource model.
1.0.9
- Add boolean type to fix deserialization
1.0.8
- API schema updated,
FundingSourcesApisupports balance check endpoint - Fix transfer failure to support deserialization with new transfer failure model.
1.0.7
- API schema updated,
CustomersAPIsupports Customer search, new softDelete method inFundingSourcesApi.
1.0.6
- API schema updated,
TransfersApihas new endpoints for cancel a transfer and get a transfer's fees, newOndemandauthorizationsApi, newMasspaymentsApi. - Existing
Document,CreateFundingSourceRequest, andTransferRequestBodymodels updated, newMassPayment,Authorization,UpdateTransfer, andFacilitatorFeeRequestmodels.
1.0.5
- API schema error fixed,
FundingSourceobject now has_embeddedkey to fix serialization issues.
1.0.4
- Avoid use of function names if found in list of PHP reserved words.
- API schema updated,
CustomersApihas new endpoints for IAV verification. - Existing
Customerrelated models updated, newVerificationTokenmodel. - (release skipped, features in 1.0.5)
1.0.3
- API schema updated,
RootApinow added. - Changed
auth_tokentoaccess_tokenin compliance with RFC-6749 recommended nomenclature.
1.0.2
- API schema updated, new methods in
FundingsourcesApi. - All methods which take Swagger variables in
path(e.g,/resource/{id}) can now be passed a resource URL to make it easier for HAL-styled API consumption. - More idiomatic response logic for HTTP 201 responses.
1.0.1
- API schema updated, new methods in
CustomersApiandTransfersApi
1.0.0
- Initial release.
This wrapper is semantically generated by a fork of swagger-codegen.
Copyright 2018 Swagger Contributors, David Stancu
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.