Getting Started with PaymentsAPI

Getting Started

Introduction

API for sending and managing payments

Install the Package

Install the gem from the command line:

gem install apimatic-ci-cd-test -v 1.0.24

Or add the gem to your Gemfile and run bundle:

gem 'apimatic-ci-cd-test', '1.0.24'

For additional gem details, see the RubyGems page for the apimatic-ci-cd-test gem.

Initialize the API Client

The following parameters are configurable for the API Client:

Parameter Type Description
x_api_key String API Key
timeout Float The value to use for connection timeout.
Default: 60
max_retries Integer The number of times to retry an endpoint call if it fails.
Default: 0
retry_interval Float Pause in seconds between retries.
Default: 1
backoff_factor Float The amount to multiply each successive retry's interval amount by in order to provide backoff.
Default: 2
retry_statuses Array A list of HTTP statuses to retry.
Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]
retry_methods Array A list of HTTP methods to retry.
Default: %i[get put]

The API client can be initialized as follows:

client = PaymentsApi::Client.new(
  x_api_key: 'x-api-key',
)

Authorization

This API uses Custom Header Signature.

Client Class Documentation

PaymentsAPI Client

The gateway for the SDK. This class acts as a factory for the Controllers and also holds the configuration of the SDK.

Controllers

Name Description
quotes Gets QuotesController
payments Gets PaymentsController

API Reference

List of APIs

Quotes

Overview

Quotes

Get instance

An instance of the QuotesController class can be accessed from the API Client.

quotes_controller = client.quotes

Create New Quote

Create new Quote

def create_new_quote(bank_id,
                     body)
Parameters
Parameter Type Tags Description
bank_id String Header, Required Bank ID (Routing Number)
Constraints: Pattern: ^\d{9}$
body Quote Body, Required Quote data
Response Type

Quote

Example Usage
bank_id = 'bankId0'
body = Quote.new
body.id = 0
body.beneficiary_amount = 12345.67
body.beneficiary_currency = 'EUR'
body.originator_amount = 76543.21
body.originator_amount_is_fixed = true
body.exchange_rate = 1.2345
body.locked = false
body.revision = 1

result = quotes_controller.create_new_quote(bank_id, body)
Example Response (as JSON)
{
  "id": 0,
  "beneficiaryAmount": 12345.67,
  "beneficiaryCurrency": "EUR",
  "originatorAmount": 76543.21,
  "originatorAmountIsFixed": true,
  "exchangeRate": 1.2345,
  "locked": false,
  "revision": 1
}
Errors
HTTP Status Code Error Description Exception Class
400 Error in Request RequestErrorException
403 Forbidden APIException
500 System Error RequestErrorException

Cancel Quote

Attempts to cancel a Quote

def cancel_quote(bank_id,
                 quote_id)
Parameters
Parameter Type Tags Description
bank_id String Header, Required Bank ID (Routing Number)
Constraints: Pattern: ^\d{9}$
quote_id Integer Template, Required ID of quote to refresh
Response Type

void

Example Usage
bank_id = 'bankId0'
quote_id = 124

result = quotes_controller.cancel_quote(bank_id, quote_id)
Errors
HTTP Status Code Error Description Exception Class
400 Error in Request RequestErrorException
403 Forbidden APIException
500 System Error RequestErrorException

Lock Quote

Lock the rate for a given Quote

def lock_quote(bank_id,
               quote_id)
Parameters
Parameter Type Tags Description
bank_id String Header, Required Bank ID (Routing Number)
Constraints: Pattern: ^\d{9}$
quote_id Integer Template, Required ID of quote to lock
Response Type

void

Example Usage
bank_id = 'bankId0'
quote_id = 124

result = quotes_controller.lock_quote(bank_id, quote_id)
Errors
HTTP Status Code Error Description Exception Class
400 Error in Request RequestErrorException
403 Forbidden APIException
500 System Error RequestErrorException

Refresh Quote

Refresh the rates for an existing Quote

def refresh_quote(bank_id,
                  quote_id)
Parameters
Parameter Type Tags Description
bank_id String Header, Required Bank ID (Routing Number)
Constraints: Pattern: ^\d{9}$
quote_id Integer Template, Required ID of quote to refresh
Response Type

Quote

Example Usage
bank_id = 'bankId0'
quote_id = 124

result = quotes_controller.refresh_quote(bank_id, quote_id)
Example Response (as JSON)
{
  "id": 0,
  "beneficiaryAmount": 12345.67,
  "beneficiaryCurrency": "EUR",
  "originatorAmount": 76543.21,
  "originatorAmountIsFixed": true,
  "exchangeRate": 1.2345,
  "locked": false,
  "revision": 1
}
Errors
HTTP Status Code Error Description Exception Class
400 Error in Request RequestErrorException
403 Forbidden APIException
500 System Error RequestErrorException

Payments

Overview

Payments

Get instance

An instance of the PaymentsController class can be accessed from the API Client.

payments_controller = client.payments

Create Payment

Creates a new Payment

def create_payment(bank_id,
                   body)
Parameters
Parameter Type Tags Description
bank_id String Header, Required Bank ID (Routing Number)
Constraints: Pattern: ^\d{9}$
body Payment Body, Required Create Payment Body Data
Response Type

Payment

Example Usage
bank_id = 'bankId0'
body = Payment.new
body.id = 987654
body.quote_id = 123456
body.originator = Originator.new
body.originator.name = 'Jake Johnson'
body.originator.address = Address.new
body.originator.address.address1 = '555 South North Lane'
body.originator.address.address2 = 'Floor 5'
body.originator.address.city = 'Springfield'
body.originator.address.state = 'VA'
body.originator.address.postal_code = '47060'
body.originator.address.country = 'US'
body. = BankAccount.new
body.. = 'DE89370400440532013000'
body..bank = Bank.new
body..bank.name = 'Bank of America'
body..bank.address = Address.new
body..bank.address.address1 = '555 South North Lane'
body..bank.address.address2 = 'Floor 5'
body..bank.address.city = 'Springfield'
body..bank.address.state = 'VA'
body..bank.address.postal_code = '47060'
body..bank.address.country = 'US'
body..bank.routing_code = 'string'
body..bank.swift_code = 'AGCAAM22'
body.beneficiary = Beneficiary.new
body.beneficiary.name = 'Jake Johnson'
body.beneficiary.address = Address.new
body.beneficiary.address.address1 = '555 South North Lane'
body.beneficiary.address.address2 = 'Floor 5'
body.beneficiary.address.city = 'Springfield'
body.beneficiary.address.state = 'VA'
body.beneficiary.address.postal_code = '47060'
body.beneficiary.address.country = 'US'
body.beneficiary.email = '[email protected]'
body.beneficiary.phone_number = '111-111-1111'
body. = BankAccount.new
body.. = 'DE89370400440532013000'
body..bank = Bank.new
body..bank.name = 'Bank of America'
body..bank.address = Address.new
body..bank.address.address1 = '555 South North Lane'
body..bank.address.address2 = 'Floor 5'
body..bank.address.city = 'Springfield'
body..bank.address.state = 'VA'
body..bank.address.postal_code = '47060'
body..bank.address.country = 'US'
body..bank.routing_code = 'string'
body..bank.swift_code = 'AGCAAM22'
body. = BankAccount.new
body.. = 'DE89370400440532013000'
body..bank = Bank.new
body..bank.name = 'Bank of America'
body..bank.address = Address.new
body..bank.address.address1 = '555 South North Lane'
body..bank.address.address2 = 'Floor 5'
body..bank.address.city = 'Springfield'
body..bank.address.state = 'VA'
body..bank.address.postal_code = '47060'
body..bank.address.country = 'US'
body..bank.routing_code = 'string'
body..bank.swift_code = 'AGCAAM22'
body.details = PaymentDetails.new
body.details.purpose_of_payment = 'Purchase of Goods'
body.details.memo = 'Invoice 12345678'
body.details.payment_reference = '1234567890'
body.status = PaymentStatus.new
body.status.approved = false
body.status.sent = false

result = payments_controller.create_payment(bank_id, body)
Example Response (as JSON)
{
  "id": 987654,
  "quoteId": 123456,
  "originator": {
    "name": "Jake Johnson",
    "address": {
      "address1": "555 South North Lane",
      "address2": "Floor 5",
      "city": "Springfield",
      "state": "VA",
      "postalCode": "47060",
      "country": "US"
    }
  },
  "originatorBankAccount": {
    "accountNumber": "DE89370400440532013000",
    "bank": {
      "name": "Bank of America",
      "address": {
        "address1": "555 South North Lane",
        "address2": "Floor 5",
        "city": "Springfield",
        "state": "VA",
        "postalCode": "47060",
        "country": "US"
      },
      "routingCode": "string",
      "swiftCode": "AGCAAM22"
    }
  },
  "beneficiary": {
    "name": "Jake Johnson",
    "address": {
      "address1": "555 South North Lane",
      "address2": "Floor 5",
      "city": "Springfield",
      "state": "VA",
      "postalCode": "47060",
      "country": "US"
    },
    "email": "[email protected]",
    "phoneNumber": "111-111-1111"
  },
  "beneficiaryBankAccount": {
    "accountNumber": "DE89370400440532013000",
    "bank": {
      "name": "Bank of America",
      "address": {
        "address1": "555 South North Lane",
        "address2": "Floor 5",
        "city": "Springfield",
        "state": "VA",
        "postalCode": "47060",
        "country": "US"
      },
      "routingCode": "string",
      "swiftCode": "AGCAAM22"
    }
  },
  "intermediaryBankAccount": {
    "accountNumber": "DE89370400440532013000",
    "bank": {
      "name": "Bank of America",
      "address": {
        "address1": "555 South North Lane",
        "address2": "Floor 5",
        "city": "Springfield",
        "state": "VA",
        "postalCode": "47060",
        "country": "US"
      },
      "routingCode": "string",
      "swiftCode": "AGCAAM22"
    }
  },
  "details": {
    "purposeOfPayment": "Purchase of Goods",
    "memo": "Invoice 12345678",
    "paymentReference": "1234567890"
  },
  "status": {
    "approved": false,
    "sent": false
  }
}
Errors
HTTP Status Code Error Description Exception Class
400 Error in Request RequestErrorException
403 Forbidden APIException
500 System Error RequestErrorException

Cancel Payment

Attempts to cancel a Payment. Does not automatically cancel the linked Quote.

def cancel_payment(bank_id,
                   payment_id)
Parameters
Parameter Type Tags Description
bank_id String Header, Required Bank ID (Routing Number)
Constraints: Pattern: ^\d{9}$
payment_id Integer Template, Required ID of payment to cancel
Response Type

void

Example Usage
bank_id = 'bankId0'
payment_id = 250

result = payments_controller.cancel_payment(bank_id, payment_id)
Errors
HTTP Status Code Error Description Exception Class
400 Error in Request RequestErrorException
403 Forbidden APIException
500 System Error RequestErrorException

Update Payment

Update the data for a Payment before it is approved or sent

def update_payment(bank_id,
                   payment_id,
                   body)
Parameters
Parameter Type Tags Description
bank_id String Header, Required Bank ID (Routing Number)
Constraints: Pattern: ^\d{9}$
payment_id Integer Template, Required ID of payment to update
body Payment Body, Required Update Payment Body Data
Response Type

Payment

Example Usage
bank_id = 'bankId0'
payment_id = 250
body = Payment.new
body.id = 987654
body.quote_id = 123456
body.originator = Originator.new
body.originator.name = 'Jake Johnson'
body.originator.address = Address.new
body.originator.address.address1 = '555 South North Lane'
body.originator.address.address2 = 'Floor 5'
body.originator.address.city = 'Springfield'
body.originator.address.state = 'VA'
body.originator.address.postal_code = '47060'
body.originator.address.country = 'US'
body. = BankAccount.new
body.. = 'DE89370400440532013000'
body..bank = Bank.new
body..bank.name = 'Bank of America'
body..bank.address = Address.new
body..bank.address.address1 = '555 South North Lane'
body..bank.address.address2 = 'Floor 5'
body..bank.address.city = 'Springfield'
body..bank.address.state = 'VA'
body..bank.address.postal_code = '47060'
body..bank.address.country = 'US'
body..bank.routing_code = 'string'
body..bank.swift_code = 'AGCAAM22'
body.beneficiary = Beneficiary.new
body.beneficiary.name = 'Jake Johnson'
body.beneficiary.address = Address.new
body.beneficiary.address.address1 = '555 South North Lane'
body.beneficiary.address.address2 = 'Floor 5'
body.beneficiary.address.city = 'Springfield'
body.beneficiary.address.state = 'VA'
body.beneficiary.address.postal_code = '47060'
body.beneficiary.address.country = 'US'
body.beneficiary.email = '[email protected]'
body.beneficiary.phone_number = '111-111-1111'
body. = BankAccount.new
body.. = 'DE89370400440532013000'
body..bank = Bank.new
body..bank.name = 'Bank of America'
body..bank.address = Address.new
body..bank.address.address1 = '555 South North Lane'
body..bank.address.address2 = 'Floor 5'
body..bank.address.city = 'Springfield'
body..bank.address.state = 'VA'
body..bank.address.postal_code = '47060'
body..bank.address.country = 'US'
body..bank.routing_code = 'string'
body..bank.swift_code = 'AGCAAM22'
body. = BankAccount.new
body.. = 'DE89370400440532013000'
body..bank = Bank.new
body..bank.name = 'Bank of America'
body..bank.address = Address.new
body..bank.address.address1 = '555 South North Lane'
body..bank.address.address2 = 'Floor 5'
body..bank.address.city = 'Springfield'
body..bank.address.state = 'VA'
body..bank.address.postal_code = '47060'
body..bank.address.country = 'US'
body..bank.routing_code = 'string'
body..bank.swift_code = 'AGCAAM22'
body.details = PaymentDetails.new
body.details.purpose_of_payment = 'Purchase of Goods'
body.details.memo = 'Invoice 12345678'
body.details.payment_reference = '1234567890'
body.status = PaymentStatus.new
body.status.approved = false
body.status.sent = false

result = payments_controller.update_payment(bank_id, payment_id, body)
Errors
HTTP Status Code Error Description Exception Class
400 Error in Request RequestErrorException
403 Forbidden APIException
500 System Error RequestErrorException

Approve Payment

Approves a Payment to be sent

def approve_payment(bank_id,
                    payment_id)
Parameters
Parameter Type Tags Description
bank_id String Header, Required Bank ID (Routing Number)
Constraints: Pattern: ^\d{9}$
payment_id Integer Template, Required ID of payment to approve
Response Type

void

Example Usage
bank_id = 'bankId0'
payment_id = 250

result = payments_controller.approve_payment(bank_id, payment_id)
Errors
HTTP Status Code Error Description Exception Class
400 Error in Request RequestErrorException
403 Forbidden APIException
500 System Error RequestErrorException

Validate Iban

Validates an IBAN and returns the bank account information

def validate_iban(bank_id,
                  iban)
Parameters
Parameter Type Tags Description
bank_id String Header, Required Bank ID (Routing Number)
Constraints: Pattern: ^\d{9}$
iban String Query, Required Currency that is required by the client, sell foreign currency in exchange for local currency
Constraints: Minimum Length: 10, Maximum Length: 35
Response Type

BankAccount

Example Usage
bank_id = 'bankId0'
iban = 'iban4'

result = payments_controller.validate_iban(bank_id, iban)
Example Response (as JSON)
{
  "accountNumber": "DE89370400440532013000",
  "bank": {
    "name": "Bank of America",
    "address": {
      "address1": "555 South North Lane",
      "address2": "Floor 5",
      "city": "Springfield",
      "state": "VA",
      "postalCode": "47060",
      "country": "US"
    },
    "routingCode": "string",
    "swiftCode": "AGCAAM22"
  }
}
Errors
HTTP Status Code Error Description Exception Class
400 Error in Request RequestErrorException
403 Forbidden APIException
500 System Error RequestErrorException

Model Reference

Structures

Address

Address Information

Class Name

Address

Fields
Name Type Tags Description
address_1 String Required Address Line 1
Constraints: Maximum Length: 35
address_2 String Optional Address Line 2
Constraints: Maximum Length: 35
city String Required City
Constraints: Maximum Length: 35
state String Optional State / Province
Constraints: Maximum Length: 60
postal_code String Required Postal Code
Constraints: Maximum Length: 12
country String Required Country (ISO 3166-1 Alpha-2 Code)
Constraints: Minimum Length: 2, Maximum Length: 2, Pattern: ^[A-Z]{2}$
Example (as JSON)
{
  "address1": "555 South North Lane",
  "address2": "Floor 5",
  "city": "Springfield",
  "state": "VA",
  "postalCode": "47060",
  "country": "US"
}

Bank

Bank Information Object

Class Name

Bank

Fields
Name Type Tags Description
name String Required Bank Name
Constraints: Maximum Length: 50
address Address Required Address Information
routing_code String Optional Routing Code. Currently only supported for USD wires. When using, please only provide SWIFT code OR routing code (not both)
Constraints: Maximum Length: 35
swift_code String Optional SWIFT BIC
Constraints: Minimum Length: 8, Maximum Length: 11, Pattern: ^[A-Za-z0-9]{4}[A-Za-z]{2}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$
Example (as JSON)
{
  "name": "Bank of America",
  "address": {
    "address1": "555 South North Lane",
    "address2": "Floor 5",
    "city": "Springfield",
    "state": "VA",
    "postalCode": "47060",
    "country": "US"
  },
  "routingCode": "string",
  "swiftCode": "AGCAAM22"
}

Bank Account

Bank Account Information Object.NOTE - originatorBankAccount bank data should not be provided when creating a new Payment. This information is retrieved from the database based on the provided bank ID.NOTE - bank object is required for all BankAccount objects except originatorBankAccount

Class Name

BankAccount

Fields
Name Type Tags Description
account_number String Optional Bank Account Number / IBAN. Required for Beneficiary Bank. Optional for Intermediary Bank.
Constraints: Maximum Length: 35
bank Bank Optional Bank Information Object
Example (as JSON)
{
  "accountNumber": "DE89370400440532013000",
  "bank": {
    "name": "Bank of America",
    "address": {
      "address1": "555 South North Lane",
      "address2": "Floor 5",
      "city": "Springfield",
      "state": "VA",
      "postalCode": "47060",
      "country": "US"
    },
    "routingCode": "string",
    "swiftCode": "AGCAAM22"
  }
}

Beneficiary

Beneficiary Information Object

Class Name

Beneficiary

Fields
Name Type Tags Description
name String Required Beneficiary Name
Constraints: Maximum Length: 80
address Address Required Address Information
email String Optional Beneficiary Email Address
Constraints: Maximum Length: 35
phone_number String Optional Beneficiary Phone Number
Constraints: Maximum Length: 35
Example (as JSON)
{
  "name": "Jake Johnson",
  "address": {
    "address1": "555 South North Lane",
    "address2": "Floor 5",
    "city": "Springfield",
    "state": "VA",
    "postalCode": "47060",
    "country": "US"
  },
  "email": "[email protected]",
  "phoneNumber": "111-111-1111"
}

Originator

Originator Information Object

Class Name

Originator

Fields
Name Type Tags Description
name String Required Originator Name
Constraints: Maximum Length: 80
address Address Required Address Information
Example (as JSON)
{
  "name": "Jake Johnson",
  "address": {
    "address1": "555 South North Lane",
    "address2": "Floor 5",
    "city": "Springfield",
    "state": "VA",
    "postalCode": "47060",
    "country": "US"
  }
}

Payment

Payment Information Object

Class Name

Payment

Fields
Name Type Tags Description
id Integer Optional Payment ID
quote_id Integer Required Quote ID
originator Originator Required Originator Information Object
originator_bank_account BankAccount Optional Bank Account Information Object.NOTE - originatorBankAccount bank data should not be provided when creating a new Payment. This information is retrieved from the database based on the provided bank ID.NOTE - bank object is required for all BankAccount objects except originatorBankAccount
beneficiary Beneficiary Required Beneficiary Information Object
beneficiary_bank_account BankAccount Required Bank Account Information Object.NOTE - originatorBankAccount bank data should not be provided when creating a new Payment. This information is retrieved from the database based on the provided bank ID.NOTE - bank object is required for all BankAccount objects except originatorBankAccount
intermediary_bank_account BankAccount Optional Bank Account Information Object.NOTE - originatorBankAccount bank data should not be provided when creating a new Payment. This information is retrieved from the database based on the provided bank ID.NOTE - bank object is required for all BankAccount objects except originatorBankAccount
details PaymentDetails Required Payment Information Data
status PaymentStatus Optional Payment Information Data
Example (as JSON)
{
  "id": 987654,
  "quoteId": 123456,
  "originator": {
    "name": "Jake Johnson",
    "address": {
      "address1": "555 South North Lane",
      "address2": "Floor 5",
      "city": "Springfield",
      "state": "VA",
      "postalCode": "47060",
      "country": "US"
    }
  },
  "originatorBankAccount": {
    "accountNumber": "DE89370400440532013000",
    "bank": {
      "name": "Bank of America",
      "address": {
        "address1": "555 South North Lane",
        "address2": "Floor 5",
        "city": "Springfield",
        "state": "VA",
        "postalCode": "47060",
        "country": "US"
      },
      "routingCode": "string",
      "swiftCode": "AGCAAM22"
    }
  },
  "beneficiary": {
    "name": "Jake Johnson",
    "address": {
      "address1": "555 South North Lane",
      "address2": "Floor 5",
      "city": "Springfield",
      "state": "VA",
      "postalCode": "47060",
      "country": "US"
    },
    "email": "[email protected]",
    "phoneNumber": "111-111-1111"
  },
  "beneficiaryBankAccount": {
    "accountNumber": "DE89370400440532013000",
    "bank": {
      "name": "Bank of America",
      "address": {
        "address1": "555 South North Lane",
        "address2": "Floor 5",
        "city": "Springfield",
        "state": "VA",
        "postalCode": "47060",
        "country": "US"
      },
      "routingCode": "string",
      "swiftCode": "AGCAAM22"
    }
  },
  "intermediaryBankAccount": {
    "accountNumber": "DE89370400440532013000",
    "bank": {
      "name": "Bank of America",
      "address": {
        "address1": "555 South North Lane",
        "address2": "Floor 5",
        "city": "Springfield",
        "state": "VA",
        "postalCode": "47060",
        "country": "US"
      },
      "routingCode": "string",
      "swiftCode": "AGCAAM22"
    }
  },
  "details": {
    "purposeOfPayment": "Purchase of Goods",
    "memo": "Invoice 12345678",
    "paymentReference": "1234567890"
  },
  "status": {
    "approved": false,
    "sent": false
  }
}

Payment Details

Payment Information Data

Class Name

PaymentDetails

Fields
Name Type Tags Description
purpose_of_payment String Required Purpose of payment
Constraints: Maximum Length: 30
memo String Optional Memo from Originator to Beneficiary
Constraints: Maximum Length: 140
payment_reference String Optional Payment Reference Information. Typically includes FI to FI notes
Constraints: Maximum Length: 140
Example (as JSON)
{
  "purposeOfPayment": "Purchase of Goods",
  "memo": "Invoice 12345678",
  "paymentReference": "1234567890"
}

Payment Status

Payment Information Data

Class Name

PaymentStatus

Fields
Name Type Tags Description
approved Boolean Optional Set to true once the payment has been approved
sent Boolean Optional Set to true once the payment has been sent
Example (as JSON)
{
  "approved": false,
  "sent": false
}

Quote

Quote Information Object

Class Name

Quote

Fields
Name Type Tags Description
id Integer Optional Quote ID
beneficiary_amount Float Optional Amount to send in beneficiary currency. Not required if originatorAmount is provided.
beneficiary_currency String Required Beneficiary currency code in ISO 4217 format
Constraints: Minimum Length: 3, Maximum Length: 3, Pattern: ^[A-Z]{3}$
originator_amount Float Optional Amount to send in originator currency. Not required if beneficiaryAmount is provided
originator_amount_is_fixed Boolean Optional If true, then the originator amount is fixed to the provided value. If false, then the beneficiary amount is fixed to the provided value. This field is automatically set based on whether the originator or beneficary amount was provided.
exchange_rate Float Optional The exchange rate for the quote
locked Boolean Optional Set to true if the quote rate is locked
revision Integer Optional Quote revision number. This is automatically incremented each time the quote is refreshed or updated, and starts from 1
Example (as JSON)
{
  "id": 0,
  "beneficiaryAmount": 12345.67,
  "beneficiaryCurrency": "EUR",
  "originatorAmount": 76543.21,
  "originatorAmountIsFixed": true,
  "exchangeRate": 1.2345,
  "locked": false,
  "revision": 1
}

Exceptions

Request Error

Format for 400 Errors

Class Name

RequestErrorException

Fields
Name Type Tags Description
message String Optional Message indicating the source of the error in the request
Example (as JSON)
{
  "message": "Error occured while performing field validation"
}

Utility Classes Documentation

ApiHelper Class

API utility class.

Methods

Name Return Type Description
json_deserialize Hash Deserializes a JSON string to a Ruby Hash.
rfc3339 DateTime Safely converts a string into an RFC3339 DateTime object.

Common Code Documentation

HttpResponse

Http response received.

Properties

Name Type Description
status_code Integer The status code returned by the server.
reason_phrase String The reason phrase returned by the server.
headers Hash Response headers.
raw_body String Response body.
request HttpRequest The request that resulted in this response.

HttpRequest

Represents a single Http Request.

Properties

Name Type Tag Description
http_method HttpMethodEnum The HTTP method of the request.
query_url String The endpoint URL for the API request.
headers Hash Optional Request headers.
parameters Hash Optional Request body.