dwolla-swagger-ruby
The new Dwolla API V2 SDK, as generated by this fork of swagger-codegen.
Version
1.0.13
Installation
dwolla_swagger is available on RubyGems.
gem install dwolla_swagger
To add as a dependency
echo "gem dwolla_swagger, '~>1.0.0'" >> Gemfile
bundle install
To install directly from source:
git clone https://github.com/Dwolla/dwolla-swagger-ruby
cd dwolla-swagger-ruby
gem build *.gemspec && gem install --local *.gem
OS X users may need to run gem install as a privileged user.
Quickstart
dwolla_swagger 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.
Configuring a client
To get started, all you need to set is the access_token and host values.
require 'dwolla_swagger'
DwollaSwagger::Swagger.configure do |config|
config.access_token = 'a token'
config.host = 'api-uat.dwolla.com'
config.base_path = '/'
end
List 10 customers
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.
my_custies = DwollaSwagger::CustomersApi.list(:limit => 10)
p my_custies.to_body
Creating a new customer
To create a customer, we can either provide a Hash with the expected values, or a CreateCustomer object.
location = DwollaSwagger::CustomersApi.create({:body => {
:firstName => 'Jennifer',
:lastName => 'Smith',
:email => '[email protected]',
:phone => '7188675309'
}})
or
jenny = DwollaSwagger::CreateCustomer.new
jenny.first_name = 'Jennifer'
jenny.last_name = 'Smith'
jenny.email = '[email protected]'
jenny.phone = '7188675309'
location = DwollaSwagger::CustomersApi.create(:body => jenny)
location will contain a URL to your newly created resource (HTTP 201 / Location header).
Modules
dwolla_swagger contains API modules which allow the user to make requests, as well as models which are DAOs that the library uses to serialize responses.
API
Each API module is named in accordance to (Dwolla's API Spec and encapsulates all of the documented functionality.
AccountsApiBusinessclassificationsApiCustomersApiDocumentsApiEventsApiFundingsourcesApiRootApiTransfersApiWebhooksApiWebhooksubscriptionsApi
Models
Each model represents the different kinds of requests and responses that can be made with the Dwolla API.
AccountInfoAmountApplicationEventBaseObjectBusinessClassificationBusinessClassificationListResponseCreateCustomerCreateFundingSourceRequestCreateWebhookCustomerCustomerListResponseDocumentDocumentListResponseEventListResponseFundingSourceFundingSourceListResponseHalLinkMoneyTransferTransferListResponseTransferRequestBodyUnitUpdateCustomerVerificationTokenVerifyMicroDepositsRequestWebhookWebhookAttemptWebhookEventListResponseWebhookHeaderWebhookHttpRequestWebhookHttpResponseWebhookListResponseWebhookRetryWebhookRetryRequestListResponseWebhookSubscription
Changelog
1.0.13
- Existing
CreateFundingSourceRequest,FundingSource,HalLink,Transfer, andTransferRequestBodymodels updated. NewClearing,MicroDepositsInitiatedUpdateSubscriptionandFailureDetailsmodels.
1.0.12
- Patch 1.0.11 update.
1.0.11
- Fix
FundingsourcesApito support optionalremovedquerystring parameter.
1.0.10
- Fix transfer failure to support deserialization with new transfer failure model.
1.0.9
- Fix how boolean values are deserialized
1.0.8
- API schema updated -
CustomersApicontains support for Customer search.FundingSourceApihas new method for soft delete and new endpoint for retrieve balance.TransfersApicontains support for cancel a transfer and new endpoint to retrieve a transfer's fees. NewOndemandauthorizationsApi,MasspaymentsApi, andMasspaymentitemsApi. - Existing
Customer,CreateFundingSourceRequest,TransferRequestBody,Document,FundingSourcemodels updated. NewMassPayment,Authorization,FundingSourceBalance,RemoveBankRequest, andUpdateTransfermodels.
1.0.7
- Ensure DateTime is loaded
1.0.6
- Fix micro deposit methods in
FundingsourcesApito fix issue where requests weren't being sent.
1.0.5
- API schema error fixed,
FundingSourceobject now has_embeddedkey to fix serialization issues.
1.0.4
- API schema updated,
CustomersApihas new endpoints for IAV verification. - Existing
Customerrelated models updated, newVerificationTokenmodel.
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.
Credits
This wrapper is semantically generated by a fork of swagger-codegen.
License
Copyright 2015 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.