Class: SubscriptionPlan

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/linerb/gen-rb/takagi_chan_types.rb,
lib/linerb/gen-rb/takagi_chan_types.rb

Constant Summary collapse

BILLINGITEMID =
1
SUBSCRIPTIONSERVICE =
2
TARGET =
3
TYPE =
4
PERIOD =
5
FREETRIAL =
6
LOCALIZEDNAME =
7
PRICE =
8
AVAILABILITY =
9
CPID =
10
NAMEKEY =
11
TIER =
12
FIELDS =
{
  BILLINGITEMID => {:type => ::Thrift::Types::STRING, :name => 'billingItemId'},
  SUBSCRIPTIONSERVICE => {:type => ::Thrift::Types::I32, :name => 'subscriptionService', :enum_class => ::J0_a_a_b_a_a_v3},
  TARGET => {:type => ::Thrift::Types::I32, :name => 'target', :enum_class => ::J0_a_a_b_a_a_s3},
  TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::J0_a_a_b_a_a_u3},
  PERIOD => {:type => ::Thrift::Types::STRING, :name => 'period'},
  FREETRIAL => {:type => ::Thrift::Types::STRING, :name => 'freeTrial'},
  LOCALIZEDNAME => {:type => ::Thrift::Types::STRING, :name => 'localizedName'},
  PRICE => {:type => ::Thrift::Types::STRUCT, :name => 'price', :class => ::Price},
  AVAILABILITY => {:type => ::Thrift::Types::I32, :name => 'availability', :enum_class => ::J0_a_a_b_a_a_r3},
  CPID => {:type => ::Thrift::Types::STRING, :name => 'cpId'},
  NAMEKEY => {:type => ::Thrift::Types::STRING, :name => 'nameKey'},
  TIER => {:type => ::Thrift::Types::I32, :name => 'tier', :enum_class => ::J0_a_a_b_a_a_t3}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



10296
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 10296

def struct_fields; FIELDS; end

#validateObject



10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 10298

def validate
  unless @subscriptionService.nil? || ::J0_a_a_b_a_a_v3::VALID_VALUES.include?(@subscriptionService)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field subscriptionService!')
  end
  unless @target.nil? || ::J0_a_a_b_a_a_s3::VALID_VALUES.include?(@target)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field target!')
  end
  unless @type.nil? || ::J0_a_a_b_a_a_u3::VALID_VALUES.include?(@type)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
  end
  unless @availability.nil? || ::J0_a_a_b_a_a_r3::VALID_VALUES.include?(@availability)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field availability!')
  end
  unless @tier.nil? || ::J0_a_a_b_a_a_t3::VALID_VALUES.include?(@tier)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field tier!')
  end
end