lib/promisepay/resources/item_resource.rb
# Get a single item for a marketplace
#
# @see https://reference.promisepay.com/#show-item
#
# @param id [String] Marketplace item ID.
#
# @return [Promisepay::Item]
Get a single item for a marketplace
Get a single item for a marketplace
def find(id, type = :full)
      case type
        when :full
          response = JSON.parse(@client.get("items/#{id}").body)
          Promisepay::Item.new(@client, response['items'])
        when :status
          response = JSON.parse(@client.get("items/#{id}/status").body)
          Promisepay::Item.new(@client, response['items'])
      end
    end
def find ( id , type = :full ) case type when :full response = JSON . parse ( @client . get ( "items/#{id}" ) . body ) Promisepay :: Item . new ( @client , response [ 'items' ] ) when :status response = JSON . parse ( @client . get ( "items/#{id}/status" ) . body ) Promisepay :: Item . new ( @client , response [ 'items' ] ) end end
Get a single item for a marketplace
Get a single item for a marketplace
None
Promisepay::Item
id
Marketplace item ID.
Marketplace item ID .
type
<not_specific>
see
None