Sha256: 7b59aa33ff2b322d92fd43943d3e23a23e2f16587cf21f914072b0a4abd3f5c2

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 KB

Contents

require_relative "model.rb"
module Figo
  # Retreive a specific standing order.
  # @param standing_order_id [String] - ID of standing order to retreive
  # @param cents [Boolean] - whether to show the balance in cents (optional)
  # @return [StandingOrder] - a single `standing_order` hash.
  def get_standing_order(standing_order_id)
    query_api_object StandingOrder, "/rest/standing_orders/" + standing_order_id, nil, "GET", nil
  end

  # Get all standing orders.
  # @param cents [Boolean] - whether to show the balance in cents (optional)
  # @return [StandingOrder] a list of `standing_order` objects.
  def get_standing_orders()
    query_api_object StandingOrder, "/rest/standing_orders", nil, "GET", "standing_orders"
  end

  # Get all standing orders.
  # @param account_id [Boolean] - ID of account to standing order
  # @return [StandingOrder] a list of `standing_order` objects.
  def get_account_standing_orders(account_id)
    query_api_object StandingOrder, "/rest/accounts/#{account_id}/standing_orders", nil, "GET", "standing_orders"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
figo-1.4.2 lib/standing_order/api_call.rb
figo-1.4.1 lib/standing_order/api_call.rb
figo-1.4.0 lib/standing_order/api_call.rb
figo-1.3.3 lib/standing_order/api_call.rb