lib/promisepay/models/item.rb
# Get fees associated to the item.
#
# @see https://reference.promisepay.com/#show-item-fees
#
# @param options [Hash] Optional options.
# @option options [Integer] :limit Can ask for up to 200 fees. default: 10
# @option options [Integer] :offset Pagination help. default: 0
#
# @return [Array<Promisepay::Fee>]
Get fees associated to the item.
Get fees associated to the item .
def fees(options = {})
      response = JSON.parse(@client.get("items/#{send(:id)}/fees", options).body)
      fees = response.key?('fees') ? response['fees'] : []
      fees.map { |attributes| Promisepay::Fee.new(@client, attributes) }
    end
def fees ( options = { } ) response = JSON . parse ( @client . get ( "items/#{send(:id)}/fees" , options ) . body ) fees = response . key? ( 'fees' ) ? response [ 'fees' ] : [ ] fees . map { | attributes | Promisepay :: Fee . new ( @client , attributes ) } end
Get fees associated to the item.
Get fees associated to the item .
None
Array<Promisepay::Fee>
options
:offset Pagination help. default: 0
: offset Pagination help . default : 0
see
None