chrisi-webster-cko / openapi-ruby-sdk

Testing out open api generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

openapi_client

OpenapiClient - the Ruby gem for the Checkout.com API Reference

Introduction

Checkout.com provides a collection of APIs that enable you to process and manage payments.

Our APIs accept and return JSON in the HTTP body and return HTTP response codes to indicate errors. You can consume the APIs directly using your favorite HTTP/REST library or make use of one of our <a href="https://docs.checkout.com/quickstart/integrate/sdks\" target="_blank">SDKs.

Our unified payments API allows you to accept payments from cards, digital wallets and the most popular alternative payment methods, as well as pay out to a variety of destinations, all using the same integration.

And with our webhook management, events and disputes APIs, you can keep on top of your transactions and react to any chargebacks, keeping your business running smoothly.

Authentication

When you sign up for an account, you are given a secret and public API key pair. You authenticate with our API by providing the appropriate key in the request Authorization header.

Never share your secret keys. Keep them guarded and secure.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://checkout.com

Installation

Build a gem

To build the Ruby code into a gem:

gem build openapi_client.gemspec

Then either install the gem locally:

gem install ./openapi_client-1.0.0.gem

(for development, run gem install --dev ./openapi_client-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 'openapi_client', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'openapi_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.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 'openapi_client'

# Setup authorization
OpenapiClient.configure do |config|
  # Configure API key authorization: ApiSecretKey
  config.api_key['ApiSecretKey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['ApiSecretKey'] = 'Bearer'
end

api_instance = OpenapiClient::CustomersApi.new
id = 'id_example' # String | The customer id
update_customer_request = OpenapiClient::UpdateCustomerRequest.new # UpdateCustomerRequest | 

begin
  #Update customer details
  api_instance.update_customer_details(id, update_customer_request)
rescue OpenapiClient::ApiError => e
  puts "Exception when calling CustomersApi->update_customer_details: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.checkout.com

Class Method HTTP request Description
OpenapiClient::CustomersApi update_customer_details PATCH /customers/{id} Update customer details
OpenapiClient::DisputesApi accept_dispute POST /disputes/{dispute_id}/accept Accept dispute
OpenapiClient::DisputesApi get_dispute_details GET /disputes/{dispute_id} Get dispute details
OpenapiClient::DisputesApi get_dispute_evidence GET /disputes/{dispute_id}/evidence Get dispute evidence
OpenapiClient::DisputesApi get_disputes GET /disputes Get disputes
OpenapiClient::DisputesApi get_file_information GET /files/{file_id} Get file information
OpenapiClient::DisputesApi provide_dispute_evidence PUT /disputes/{dispute_id}/evidence Provide dispute evidence
OpenapiClient::DisputesApi submit_dispute_evidence POST /disputes/{dispute_id}/evidence Submit dispute evidence
OpenapiClient::DisputesApi upload_file POST /files Upload file
OpenapiClient::EventsApi retrieve_event GET /events/{eventId} Retrieve event
OpenapiClient::EventsApi retrieve_event_notification GET /events/{eventId}/notifications/{notificationId} Retrieve event notification
OpenapiClient::EventsApi retrieve_event_types GET /event-types Retrieve event types
OpenapiClient::EventsApi retry_all_webhooks POST /events/{eventId}/webhooks/retry Retry all webhooks
OpenapiClient::EventsApi retry_webhook POST /events/{eventId}/webhooks/{webhookId}/retry Retry webhook
OpenapiClient::HostedPaymentsPageApi create_a_hosted_payments_session POST /hosted-payments Create a Hosted Payments Page session
OpenapiClient::InstrumentsApi create_an_instrument POST /instruments Create an instrument
OpenapiClient::InstrumentsApi get_instrument_details GET /instruments/{id} Get instrument details
OpenapiClient::InstrumentsApi update_instrument_details PATCH /instruments/{id} Update instrument details
OpenapiClient::PaymentLinksApi create_a_payment_link_session POST /payment-links Create a Payment Link
OpenapiClient::PaymentsApi capture_a_payment POST /payments/{id}/captures Capture a payment
OpenapiClient::PaymentsApi get_payment_actions GET /payments/{id}/actions Get payment actions
OpenapiClient::PaymentsApi get_payment_details GET /payments/{id} Get payment details
OpenapiClient::PaymentsApi refund_a_payment POST /payments/{id}/refunds Refund a payment
OpenapiClient::PaymentsApi request_a_payment_or_payout POST /payments Request a payment or payout
OpenapiClient::PaymentsApi void_a_payment POST /payments/{id}/voids Void a payment
OpenapiClient::ReconciliationApi get_csv_payments_report GET /reporting/payments/download Get CSV payments report
OpenapiClient::ReconciliationApi get_csv_single_statement_report GET /reporting/statements/{StatementId}/payments/download Get CSV single statement report
OpenapiClient::ReconciliationApi get_csv_statements_report GET /reporting/statements/download Get CSV statements report
OpenapiClient::ReconciliationApi get_json_payments_report GET /reporting/payments Get JSON payments report
OpenapiClient::ReconciliationApi get_json_single_payment_report GET /reporting/payments/{paymentId} Get JSON single payment report
OpenapiClient::ReconciliationApi get_json_statements_report GET /reporting/statements Get JSON statements report
OpenapiClient::SourcesApi add_a_payment_source POST /sources Add a payment source
OpenapiClient::TokensApi request_a_token POST /tokens Request a token
OpenapiClient::WebhooksApi partially_update_webhook PATCH /webhooks/{id} Partially update webhook
OpenapiClient::WebhooksApi register_webhook POST /webhooks Register webhook
OpenapiClient::WebhooksApi remove_webhook DELETE /webhooks/{id} Remove webhook
OpenapiClient::WebhooksApi retrieve_webhook GET /webhooks/{id} Retrieve webhook
OpenapiClient::WebhooksApi retrieve_webhooks GET /webhooks Retrieve webhooks
OpenapiClient::WebhooksApi update_webhook PUT /webhooks/{id} Update webhook

Documentation for Models

Documentation for Authorization

ApiPublicKey

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

ApiSecretKey

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

About

Testing out open api generator


Languages

Language:Ruby 100.0%Language:Shell 0.0%