lib/promisepay/models/user.rb
# Lists items for a user on a marketplace.
#
# @see https://reference.promisepay.com/#list-user-items
#
# @return [Array<Promisepay::Item>]
Lists items for a user on a marketplace.
Lists items for a user on a marketplace .
def items
      response = JSON.parse(@client.get("users/#{send(:id)}/items").body)
      users = response.key?('items') ? response['items'] : []
      users.map { |attributes| Promisepay::Item.new(@client, attributes) }
    end
def items response = JSON . parse ( @client . get ( "users/#{send(:id)}/items" ) . body ) users = response . key? ( 'items' ) ? response [ 'items' ] : [ ] users . map { | attributes | Promisepay :: Item . new ( @client , attributes ) } end
Lists items for a user on a marketplace.
Lists items for a user on a marketplace .
None
Array<Promisepay::Item>
see
None