Mooncard - the Ruby gem for the Mooncard API
Access Mooncard data from anywhere
This SDK is automatically generated by the Swagger Codegen project:
- API version: 3.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.RubyClientCodegen
To build the Ruby code into a gem:
gem build mooncard-sdk.gemspec
Then either install the gem locally:
gem install ./mooncard-sdk-1.0.0.gem
(for development, run gem install --dev ./mooncard-sdk-1.0.0.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'mooncard-sdk', '~> 1.0.0'
If the Ruby gem is hosted at a git repository: https://github.com/YOUR_GIT_USERNAME/YOUR_GIT_REPO, then add the following in the Gemfile:
gem 'mooncard-sdk', :git => 'https://github.com/YOUR_GIT_USERNAME/YOUR_GIT_REPO.git'
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Please follow the installation procedure and then run the following code:
# Load the gem
require 'mooncard-sdk'
# Setup authorization
Mooncard.configure do |config|
# Configure OAuth2 access token for authorization: oauth
config.access_token = 'YOUR ACCESS TOKEN'
end
api_instance = Mooncard::AccountMovementsApi.new
id = 'id_example' # String |
begin
api_instance.find(id)
rescue Mooncard::ApiError => e
puts "Exception when calling AccountMovementsApi->find: #{e}"
end
All URIs are relative to https://app.mooncard.co
Class | Method | HTTP request | Description |
---|---|---|---|
Mooncard::AccountMovementsApi | find | GET /api/v3/account_movements/{id} | |
Mooncard::AccountMovementsApi | list | GET /api/v3/account_movements | |
Mooncard::AccountsApi | find | GET /api/v3/accounts/{id} | |
Mooncard::AccountsApi | list | GET /api/v3/accounts | |
Mooncard::AnalyticCodesApi | create | POST /api/v3/analytic_codes | |
Mooncard::AnalyticCodesApi | delete | DELETE /api/v3/analytic_codes/{id} | |
Mooncard::AnalyticCodesApi | find | GET /api/v3/analytic_codes/{id} | |
Mooncard::AnalyticCodesApi | list | GET /api/v3/analytic_codes | |
Mooncard::AnalyticCodesApi | update | PUT /api/v3/analytic_codes/{id} | |
Mooncard::BusinessCodesApi | create | POST /api/v3/business_codes | |
Mooncard::BusinessCodesApi | delete | DELETE /api/v3/business_codes/{id} | |
Mooncard::BusinessCodesApi | find | GET /api/v3/business_codes/{id} | |
Mooncard::BusinessCodesApi | list | GET /api/v3/business_codes | |
Mooncard::BusinessCodesApi | update | PUT /api/v3/business_codes/{id} | |
Mooncard::CardActivationApi | create | POST /api/v3/card_activation | |
Mooncard::CardAssignApi | create | POST /api/v3/card_assign | |
Mooncard::CardsApi | find | GET /api/v3/cards/{id} | |
Mooncard::CardsApi | list | GET /api/v3/cards | |
Mooncard::CardsApi | update | PUT /api/v3/cards/{id} | |
Mooncard::ExpenseCategoriesApi | create | POST /api/v3/expense_categories | |
Mooncard::ExpenseCategoriesApi | delete | DELETE /api/v3/expense_categories/{id} | |
Mooncard::ExpenseCategoriesApi | find | GET /api/v3/expense_categories/{id} | |
Mooncard::ExpenseCategoriesApi | list | GET /api/v3/expense_categories | |
Mooncard::ExpenseCategoriesApi | update | PUT /api/v3/expense_categories/{id} | |
Mooncard::ExpensesApi | find | GET /api/v3/expenses/{id} | |
Mooncard::ExpensesApi | list | GET /api/v3/expenses | |
Mooncard::MeApi | get | GET /api/v3/me | |
Mooncard::ReceiptsApi | create | POST /api/v3/receipts | |
Mooncard::ReceiptsApi | delete | DELETE /api/v3/receipts/{id} | |
Mooncard::ReceiptsApi | find | GET /api/v3/receipts/{id} | |
Mooncard::ReceiptsApi | get_api_v3_receipts | GET /api/v3/receipts | |
Mooncard::ReceiptsApi | update | PUT /api/v3/receipts/{id} | |
Mooncard::SendCardPinApi | send | POST /api/v3/send_card_pin | |
Mooncard::UserProfilesApi | create | POST /api/v3/user_profiles | |
Mooncard::UserProfilesApi | delete | DELETE /api/v3/user_profiles/{id} | |
Mooncard::UserProfilesApi | find | GET /api/v3/user_profiles/{id} | |
Mooncard::UserProfilesApi | list | GET /api/v3/user_profiles | |
Mooncard::UserProfilesApi | update | PUT /api/v3/user_profiles/{id} | |
Mooncard::WebhooksApi | create | POST /api/v3/webhooks | |
Mooncard::WebhooksApi | delete | DELETE /api/v3/webhooks/{id} | |
Mooncard::WebhooksApi | find | GET /api/v3/webhooks/{id} | |
Mooncard::WebhooksApi | list | GET /api/v3/webhooks | |
Mooncard::WebhooksApi | put_api_v3_webhooks_id | PUT /api/v3/webhooks/{id} |
- Mooncard::Account
- Mooncard::Address
- Mooncard::AnalyticCode
- Mooncard::BusinessCode
- Mooncard::Card
- Mooncard::CardExpense
- Mooncard::Expense
- Mooncard::ExpenseCategory
- Mooncard::ExpenseSource
- Mooncard::KmExpense
- Mooncard::ManualExpense
- Mooncard::Movement
- Mooncard::PostApiV3AnalyticCodes
- Mooncard::PostApiV3AnalyticCodesAnalyticCode
- Mooncard::PostApiV3BusinessCodes
- Mooncard::PostApiV3CardActivation
- Mooncard::PostApiV3CardActivationCardActivation
- Mooncard::PostApiV3CardAssign
- Mooncard::PostApiV3CardAssignCardAssign
- Mooncard::PostApiV3ExpenseCategories
- Mooncard::PostApiV3ExpenseCategoriesExpenseCategory
- Mooncard::PostApiV3Receipts
- Mooncard::PostApiV3ReceiptsReceipt
- Mooncard::PostApiV3SendCardPin
- Mooncard::PostApiV3SendCardPinCardPin
- Mooncard::PostApiV3UserProfiles
- Mooncard::PostApiV3UserProfilesUserProfile
- Mooncard::PostApiV3Webhooks
- Mooncard::PostApiV3WebhooksWebhook
- Mooncard::PutApiV3AnalyticCodes
- Mooncard::PutApiV3AnalyticCodesAnalyticCode
- Mooncard::PutApiV3BusinessCodes
- Mooncard::PutApiV3BusinessCodesBusinessCode
- Mooncard::PutApiV3Cards
- Mooncard::PutApiV3CardsCard
- Mooncard::PutApiV3ExpenseCategories
- Mooncard::PutApiV3ExpenseCategoriesExpenseCategory
- Mooncard::PutApiV3Receipts
- Mooncard::PutApiV3ReceiptsReceipt
- Mooncard::PutApiV3UserProfiles
- Mooncard::PutApiV3UserProfilesUserProfile
- Mooncard::PutApiV3Webhooks
- Mooncard::PutApiV3WebhooksWebhook
- Mooncard::Receipt
- Mooncard::UserProfile
- Mooncard::Webhook
- Type: OAuth
- Flow: password
- Authorization URL:
- Scopes:
- read: Grants read access