Class: Copilot::ModelBilling

Inherits:
Struct
  • Object
show all
Defined in:
lib/copilot/types.rb

Overview

Model billing information.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#multiplierObject

Returns the value of attribute multiplier

Returns:

  • (Object)

    the current value of multiplier



663
664
665
# File 'lib/copilot/types.rb', line 663

def multiplier
  @multiplier
end

#picker_price_categoryObject

Returns the value of attribute picker_price_category

Returns:

  • (Object)

    the current value of picker_price_category



663
664
665
# File 'lib/copilot/types.rb', line 663

def picker_price_category
  @picker_price_category
end

#token_pricesObject

Returns the value of attribute token_prices

Returns:

  • (Object)

    the current value of token_prices



663
664
665
# File 'lib/copilot/types.rb', line 663

def token_prices
  @token_prices
end

Class Method Details

.from_hash(h) ⇒ Object



664
665
666
667
668
669
670
# File 'lib/copilot/types.rb', line 664

def self.from_hash(h)
  new(
    multiplier: h["multiplier"],
    token_prices: h["tokenPrices"] ? ModelBillingTokenPrices.from_hash(h["tokenPrices"]) : nil,
    picker_price_category: h["pickerPriceCategory"]
  )
end