mooncard-sdk

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

Installation

Build a gem

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'

Install from Git

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

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

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

Documentation for API Endpoints

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}

Documentation for Models

Documentation for Authorization

oauth

  • Type: OAuth
  • Flow: password
  • Authorization URL:
  • Scopes:
    • read: Grants read access