Omise.Receipt (omise v0.10.0)
Provides Receipt API interfaces.
Summary
Types
@type t() :: %Omise.Receipt{ adjustment_transaction: String.t(), charge_fee: integer(), company_address: String.t(), company_name: String.t(), company_tax_id: String.t(), credit_note: boolean(), currency: String.t(), customer_address: String.t(), customer_email: String.t(), customer_name: String.t(), customer_statement_name: String.t(), customer_tax_id: String.t(), date: String.t(), id: String.t(), issued_on: String.t(), location: String.t(), number: String.t(), object: String.t(), subtotal: integer(), total: integer(), transfer_fee: integer(), vat: integer(), voided_fee: integer(), wht: integer() }
Functions
Link to this function
list(params \\ [], opts \\ [])
@spec list(Keyword.t(), Keyword.t()) :: {:ok, Omise.List.t()} | {:error, Omise.Error.t()}
List all receipts.
Returns {:ok, receipts}
if the request is successful, {:error, error}
otherwise.
Query Parameters:
offset
- (optional, default: 0) The offset of the first record returned.limit
- (optional, default: 20, maximum: 100) The maximum amount of records returned.from
- (optional, default: 1970-01-01T00:00:00Z, format: ISO 8601) The UTC date and time limiting the beginning of returned records.to
- (optional, default: current UTC Datetime, format: ISO 8601) The UTC date and time limiting the end of returned records.
Examples
Omise.Receipt.list
Omise.Receipt.list(limit: 5)
Link to this function
retrieve(id, opts \\ [])
@spec retrieve(String.t(), Keyword.t()) :: {:ok, t()} | {:error, Omise.Error.t()}
Retrieve a receipt.
Returns {:ok, receipt}
if the request is successful, {:error, error}
otherwise.
Examples
Omise.Receipt.retrieve("rcpt_test_4z6p7e0m4k40txecj5o")