Sha256: 2d6ed7bf982dbdea21e6c730f6403acfbeb674db1ab97dc0d4568b894deac621

Contents?: true

Size: 1.82 KB

Versions: 2

Compression:

Stored size: 1.82 KB

Contents

=begin
#Billing API

#Automate your infrastructure billing with the Bare Metal Cloud Billing API. Reserve your server instances to ensure guaranteed resource availability for 12, 24, and 36 months. Retrieve your server’s rated usage for a given period and enable or disable auto-renewals.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/phoenixnap-bare-metal-cloud-billing-models' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/billing/v1/)</b> 

The version of the OpenAPI document: 0.1
Contact: support@phoenixnap.com
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 7.2.0

=end

require 'date'
require 'time'

module BillingApi
  class ReservationModelEnum
    ONE_MONTH_RESERVATION = "ONE_MONTH_RESERVATION".freeze
    TWELVE_MONTHS_RESERVATION = "TWELVE_MONTHS_RESERVATION".freeze
    TWENTY_FOUR_MONTHS_RESERVATION = "TWENTY_FOUR_MONTHS_RESERVATION".freeze
    THIRTY_SIX_MONTHS_RESERVATION = "THIRTY_SIX_MONTHS_RESERVATION".freeze
    FREE_TIER = "FREE_TIER".freeze

    def self.all_vars
      @all_vars ||= [ONE_MONTH_RESERVATION, TWELVE_MONTHS_RESERVATION, TWENTY_FOUR_MONTHS_RESERVATION, THIRTY_SIX_MONTHS_RESERVATION, FREE_TIER].freeze
    end

    # Builds the enum from string
    # @param [String] The enum value in the form of the string
    # @return [String] The enum value
    def self.build_from_hash(value)
      new.build_from_hash(value)
    end

    # Builds the enum from string
    # @param [String] The enum value in the form of the string
    # @return [String] The enum value
    def build_from_hash(value)
      return value if ReservationModelEnum.all_vars.include?(value)
      raise "Invalid ENUM value #{value} for class #ReservationModelEnum"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pnap_billing_api-2.0.0 lib/pnap_billing_api/models/reservation_model_enum.rb
pnap_billing_api-1.0.0 lib/pnap_billing_api/models/reservation_model_enum.rb