Class: NftmakerApi::Client::Reservations
- Inherits:
-
Object
- Object
- NftmakerApi::Client::Reservations
- Defined in:
- lib/nftmaker_api/client/reservations.rb
Instance Method Summary collapse
- #create(nft_id: nil, nft_count:, lovelace:) ⇒ Object
-
#initialize(client, project_id:) ⇒ Reservations
constructor
A new instance of Reservations.
Constructor Details
#initialize(client, project_id:) ⇒ Reservations
Returns a new instance of Reservations.
3 4 5 6 |
# File 'lib/nftmaker_api/client/reservations.rb', line 3 def initialize(client, project_id:) @client = client @project_id = project_id end |
Instance Method Details
#create(nft_id: nil, nft_count:, lovelace:) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/nftmaker_api/client/reservations.rb', line 8 def create(nft_id: nil, nft_count:, lovelace:) if nft_id.blank? endpoint = "GetAddressForRandomNftSale/#{@client.api_key}/#{@project_id}/#{nft_count}/#{lovelace}" else endpoint = "GetAddressForSpecificNftSale/#{@client.api_key}/#{@project_id}/#{nft_id}/#{nft_count}/#{lovelace}" end @client.get endpoint end |