Class: Io::Flow::V0::Models::RatecardFee
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::RatecardFee
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Direct Known Subclasses
CrossdockRatecardFee, DdpRatecardFee, DutiesTaxesPaidSurchargeRatecardFee, EmergencySituationSurchargeRatecardFee, FuelSurchargeRatecardFee, OversizedShipmentRatecardFee, PeakSurchargeRatecardFee, RatecardFeeUndefinedType, RemoteAreaRatecardFee, ReturnPackageRatecardFee
Defined Under Namespace
Modules: Types
Instance Attribute Summary collapse
-
#discriminator ⇒ Object
readonly
Returns the value of attribute discriminator.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(incoming = {}) ⇒ RatecardFee
constructor
A new instance of RatecardFee.
- #subtype_to_hash ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ RatecardFee
Returns a new instance of RatecardFee.
14854 14855 14856 14857 14858 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14854 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:discriminator], 'RatecardFee') @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String) end |
Instance Attribute Details
#discriminator ⇒ Object (readonly)
Returns the value of attribute discriminator.
14852 14853 14854 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14852 def discriminator @discriminator end |
Class Method Details
.from_json(hash) ⇒ Object
Instance Method Details
#subtype_to_hash ⇒ Object
14860 14861 14862 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14860 def subtype_to_hash raise 'Cannot serialize an instance of ratecard_fee directly - must use one of the specific types: ddp_ratecard_fee, fuel_surcharge_ratecard_fee, oversized_shipment_ratecard_fee, return_package_ratecard_fee, crossdock_ratecard_fee, remote_area_ratecard_fee, emergency_situation_surcharge_ratecard_fee, peak_surcharge_ratecard_fee, duties_taxes_paid_surcharge_ratecard_fee' end |
#to_hash ⇒ Object
14864 14865 14866 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14864 def to_hash subtype_to_hash.merge(:discriminator => @discriminator) end |