Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apimatic-ci-cd-test

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apimatic-ci-cd-test

  • 1.0.24
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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:

ParameterTypeDescription
x_api_keyStringAPI Key
timeoutFloatThe value to use for connection timeout.
Default: 60
max_retriesIntegerThe number of times to retry an endpoint call if it fails.
Default: 0
retry_intervalFloatPause in seconds between retries.
Default: 1
backoff_factorFloatThe amount to multiply each successive retry's interval amount by in order to provide backoff.
Default: 2
retry_statusesArrayA list of HTTP statuses to retry.
Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]
retry_methodsArrayA 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

NameDescription
quotesGets QuotesController
paymentsGets 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
ParameterTypeTagsDescription
bank_idStringHeader, RequiredBank ID (Routing Number)
Constraints: Pattern: ^\d{9}$
bodyQuoteBody, RequiredQuote 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 CodeError DescriptionException Class
400Error in RequestRequestErrorException
403ForbiddenAPIException
500System ErrorRequestErrorException
Cancel Quote

Attempts to cancel a Quote

def cancel_quote(bank_id,
                 quote_id)
Parameters
ParameterTypeTagsDescription
bank_idStringHeader, RequiredBank ID (Routing Number)
Constraints: Pattern: ^\d{9}$
quote_idIntegerTemplate, RequiredID 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 CodeError DescriptionException Class
400Error in RequestRequestErrorException
403ForbiddenAPIException
500System ErrorRequestErrorException
Lock Quote

Lock the rate for a given Quote

def lock_quote(bank_id,
               quote_id)
Parameters
ParameterTypeTagsDescription
bank_idStringHeader, RequiredBank ID (Routing Number)
Constraints: Pattern: ^\d{9}$
quote_idIntegerTemplate, RequiredID 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 CodeError DescriptionException Class
400Error in RequestRequestErrorException
403ForbiddenAPIException
500System ErrorRequestErrorException
Refresh Quote

Refresh the rates for an existing Quote

def refresh_quote(bank_id,
                  quote_id)
Parameters
ParameterTypeTagsDescription
bank_idStringHeader, RequiredBank ID (Routing Number)
Constraints: Pattern: ^\d{9}$
quote_idIntegerTemplate, RequiredID 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 CodeError DescriptionException Class
400Error in RequestRequestErrorException
403ForbiddenAPIException
500System ErrorRequestErrorException

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
ParameterTypeTagsDescription
bank_idStringHeader, RequiredBank ID (Routing Number)
Constraints: Pattern: ^\d{9}$
bodyPaymentBody, RequiredCreate 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.originator_bank_account = BankAccount.new
body.originator_bank_account.account_number = 'DE89370400440532013000'
body.originator_bank_account.bank = Bank.new
body.originator_bank_account.bank.name = 'Bank of America'
body.originator_bank_account.bank.address = Address.new
body.originator_bank_account.bank.address.address1 = '555 South North Lane'
body.originator_bank_account.bank.address.address2 = 'Floor 5'
body.originator_bank_account.bank.address.city = 'Springfield'
body.originator_bank_account.bank.address.state = 'VA'
body.originator_bank_account.bank.address.postal_code = '47060'
body.originator_bank_account.bank.address.country = 'US'
body.originator_bank_account.bank.routing_code = 'string'
body.originator_bank_account.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 = 'beneficiary@example.com'
body.beneficiary.phone_number = '111-111-1111'
body.beneficiary_bank_account = BankAccount.new
body.beneficiary_bank_account.account_number = 'DE89370400440532013000'
body.beneficiary_bank_account.bank = Bank.new
body.beneficiary_bank_account.bank.name = 'Bank of America'
body.beneficiary_bank_account.bank.address = Address.new
body.beneficiary_bank_account.bank.address.address1 = '555 South North Lane'
body.beneficiary_bank_account.bank.address.address2 = 'Floor 5'
body.beneficiary_bank_account.bank.address.city = 'Springfield'
body.beneficiary_bank_account.bank.address.state = 'VA'
body.beneficiary_bank_account.bank.address.postal_code = '47060'
body.beneficiary_bank_account.bank.address.country = 'US'
body.beneficiary_bank_account.bank.routing_code = 'string'
body.beneficiary_bank_account.bank.swift_code = 'AGCAAM22'
body.intermediary_bank_account = BankAccount.new
body.intermediary_bank_account.account_number = 'DE89370400440532013000'
body.intermediary_bank_account.bank = Bank.new
body.intermediary_bank_account.bank.name = 'Bank of America'
body.intermediary_bank_account.bank.address = Address.new
body.intermediary_bank_account.bank.address.address1 = '555 South North Lane'
body.intermediary_bank_account.bank.address.address2 = 'Floor 5'
body.intermediary_bank_account.bank.address.city = 'Springfield'
body.intermediary_bank_account.bank.address.state = 'VA'
body.intermediary_bank_account.bank.address.postal_code = '47060'
body.intermediary_bank_account.bank.address.country = 'US'
body.intermediary_bank_account.bank.routing_code = 'string'
body.intermediary_bank_account.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": "beneficiary@example.com",
    "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 CodeError DescriptionException Class
400Error in RequestRequestErrorException
403ForbiddenAPIException
500System ErrorRequestErrorException
Cancel Payment

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

def cancel_payment(bank_id,
                   payment_id)
Parameters
ParameterTypeTagsDescription
bank_idStringHeader, RequiredBank ID (Routing Number)
Constraints: Pattern: ^\d{9}$
payment_idIntegerTemplate, RequiredID 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 CodeError DescriptionException Class
400Error in RequestRequestErrorException
403ForbiddenAPIException
500System ErrorRequestErrorException
Update Payment

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

def update_payment(bank_id,
                   payment_id,
                   body)
Parameters
ParameterTypeTagsDescription
bank_idStringHeader, RequiredBank ID (Routing Number)
Constraints: Pattern: ^\d{9}$
payment_idIntegerTemplate, RequiredID of payment to update
bodyPaymentBody, RequiredUpdate 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.originator_bank_account = BankAccount.new
body.originator_bank_account.account_number = 'DE89370400440532013000'
body.originator_bank_account.bank = Bank.new
body.originator_bank_account.bank.name = 'Bank of America'
body.originator_bank_account.bank.address = Address.new
body.originator_bank_account.bank.address.address1 = '555 South North Lane'
body.originator_bank_account.bank.address.address2 = 'Floor 5'
body.originator_bank_account.bank.address.city = 'Springfield'
body.originator_bank_account.bank.address.state = 'VA'
body.originator_bank_account.bank.address.postal_code = '47060'
body.originator_bank_account.bank.address.country = 'US'
body.originator_bank_account.bank.routing_code = 'string'
body.originator_bank_account.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 = 'beneficiary@example.com'
body.beneficiary.phone_number = '111-111-1111'
body.beneficiary_bank_account = BankAccount.new
body.beneficiary_bank_account.account_number = 'DE89370400440532013000'
body.beneficiary_bank_account.bank = Bank.new
body.beneficiary_bank_account.bank.name = 'Bank of America'
body.beneficiary_bank_account.bank.address = Address.new
body.beneficiary_bank_account.bank.address.address1 = '555 South North Lane'
body.beneficiary_bank_account.bank.address.address2 = 'Floor 5'
body.beneficiary_bank_account.bank.address.city = 'Springfield'
body.beneficiary_bank_account.bank.address.state = 'VA'
body.beneficiary_bank_account.bank.address.postal_code = '47060'
body.beneficiary_bank_account.bank.address.country = 'US'
body.beneficiary_bank_account.bank.routing_code = 'string'
body.beneficiary_bank_account.bank.swift_code = 'AGCAAM22'
body.intermediary_bank_account = BankAccount.new
body.intermediary_bank_account.account_number = 'DE89370400440532013000'
body.intermediary_bank_account.bank = Bank.new
body.intermediary_bank_account.bank.name = 'Bank of America'
body.intermediary_bank_account.bank.address = Address.new
body.intermediary_bank_account.bank.address.address1 = '555 South North Lane'
body.intermediary_bank_account.bank.address.address2 = 'Floor 5'
body.intermediary_bank_account.bank.address.city = 'Springfield'
body.intermediary_bank_account.bank.address.state = 'VA'
body.intermediary_bank_account.bank.address.postal_code = '47060'
body.intermediary_bank_account.bank.address.country = 'US'
body.intermediary_bank_account.bank.routing_code = 'string'
body.intermediary_bank_account.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 CodeError DescriptionException Class
400Error in RequestRequestErrorException
403ForbiddenAPIException
500System ErrorRequestErrorException
Approve Payment

Approves a Payment to be sent

def approve_payment(bank_id,
                    payment_id)
Parameters
ParameterTypeTagsDescription
bank_idStringHeader, RequiredBank ID (Routing Number)
Constraints: Pattern: ^\d{9}$
payment_idIntegerTemplate, RequiredID 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 CodeError DescriptionException Class
400Error in RequestRequestErrorException
403ForbiddenAPIException
500System ErrorRequestErrorException
Validate Iban

Validates an IBAN and returns the bank account information

def validate_iban(bank_id,
                  iban)
Parameters
ParameterTypeTagsDescription
bank_idStringHeader, RequiredBank ID (Routing Number)
Constraints: Pattern: ^\d{9}$
ibanStringQuery, RequiredCurrency 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 CodeError DescriptionException Class
400Error in RequestRequestErrorException
403ForbiddenAPIException
500System ErrorRequestErrorException

Model Reference

Structures

Address

Address Information

Class Name

Address

Fields
NameTypeTagsDescription
address_1StringRequiredAddress Line 1
Constraints: Maximum Length: 35
address_2StringOptionalAddress Line 2
Constraints: Maximum Length: 35
cityStringRequiredCity
Constraints: Maximum Length: 35
stateStringOptionalState / Province
Constraints: Maximum Length: 60
postal_codeStringRequiredPostal Code
Constraints: Maximum Length: 12
countryStringRequiredCountry (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
NameTypeTagsDescription
nameStringRequiredBank Name
Constraints: Maximum Length: 50
addressAddressRequiredAddress Information
routing_codeStringOptionalRouting Code. Currently only supported for USD wires. When using, please only provide SWIFT code OR routing code (not both)
Constraints: Maximum Length: 35
swift_codeStringOptionalSWIFT 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
NameTypeTagsDescription
account_numberStringOptionalBank Account Number / IBAN. Required for Beneficiary Bank. Optional for Intermediary Bank.
Constraints: Maximum Length: 35
bankBankOptionalBank 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
NameTypeTagsDescription
nameStringRequiredBeneficiary Name
Constraints: Maximum Length: 80
addressAddressRequiredAddress Information
emailStringOptionalBeneficiary Email Address
Constraints: Maximum Length: 35
phone_numberStringOptionalBeneficiary 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": "beneficiary@example.com",
  "phoneNumber": "111-111-1111"
}
Originator

Originator Information Object

Class Name

Originator

Fields
NameTypeTagsDescription
nameStringRequiredOriginator Name
Constraints: Maximum Length: 80
addressAddressRequiredAddress 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
NameTypeTagsDescription
idIntegerOptionalPayment ID
quote_idIntegerRequiredQuote ID
originatorOriginatorRequiredOriginator Information Object
originator_bank_accountBankAccountOptionalBank 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
beneficiaryBeneficiaryRequiredBeneficiary Information Object
beneficiary_bank_accountBankAccountRequiredBank 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_accountBankAccountOptionalBank 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
detailsPaymentDetailsRequiredPayment Information Data
statusPaymentStatusOptionalPayment 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": "beneficiary@example.com",
    "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
NameTypeTagsDescription
purpose_of_paymentStringRequiredPurpose of payment
Constraints: Maximum Length: 30
memoStringOptionalMemo from Originator to Beneficiary
Constraints: Maximum Length: 140
payment_referenceStringOptionalPayment 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
NameTypeTagsDescription
approvedBooleanOptionalSet to true once the payment has been approved
sentBooleanOptionalSet to true once the payment has been sent
Example (as JSON)
{
  "approved": false,
  "sent": false
}
Quote

Quote Information Object

Class Name

Quote

Fields
NameTypeTagsDescription
idIntegerOptionalQuote ID
beneficiary_amountFloatOptionalAmount to send in beneficiary currency. Not required if originatorAmount is provided.
beneficiary_currencyStringRequiredBeneficiary currency code in ISO 4217 format
Constraints: Minimum Length: 3, Maximum Length: 3, Pattern: ^[A-Z]{3}$
originator_amountFloatOptionalAmount to send in originator currency. Not required if beneficiaryAmount is provided
originator_amount_is_fixedBooleanOptionalIf 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_rateFloatOptionalThe exchange rate for the quote
lockedBooleanOptionalSet to true if the quote rate is locked
revisionIntegerOptionalQuote 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
NameTypeTagsDescription
messageStringOptionalMessage 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

NameReturn TypeDescription
json_deserializeHashDeserializes a JSON string to a Ruby Hash.
rfc3339DateTimeSafely converts a string into an RFC3339 DateTime object.

Common Code Documentation

HttpResponse

Http response received.

Properties
NameTypeDescription
status_codeIntegerThe status code returned by the server.
reason_phraseStringThe reason phrase returned by the server.
headersHashResponse headers.
raw_bodyStringResponse body.
requestHttpRequestThe request that resulted in this response.

HttpRequest

Represents a single Http Request.

Properties
NameTypeTagDescription
http_methodHttpMethodEnumThe HTTP method of the request.
query_urlStringThe endpoint URL for the API request.
headersHashOptionalRequest headers.
parametersHashOptionalRequest body.

FAQs

Package last updated on 02 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc