Current section

Files

Jump to
google_api_content lib google_api content v2 model rate_group.ex
Raw

lib/google_api/content/v2/model/rate_group.ex

# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule GoogleApi.Content.V2.Model.RateGroup do
@moduledoc """
## Attributes
- applicableShippingLabels ([String.t]): A list of shipping labels defining the products to which this rate group applies to. This is a disjunction: only one of the labels has to match for the rate group to apply. May only be empty for the last rate group of a service. Required. Defaults to: `null`.
- carrierRates ([CarrierRate]): A list of carrier rates that can be referred to by mainTable or singleValue. Defaults to: `null`.
- mainTable (Table): A table defining the rate group, when singleValue is not expressive enough. Can only be set if singleValue is not set. Defaults to: `null`.
- name (String.t): Name of the rate group. Optional. If set has to be unique within shipping service. Defaults to: `null`.
- singleValue (Value): The value of the rate group (e.g. flat rate $10). Can only be set if mainTable and subtables are not set. Defaults to: `null`.
- subtables ([Table]): A list of subtables referred to by mainTable. Can only be set if mainTable is set. Defaults to: `null`.
"""
use GoogleApi.Gax.ModelBase
@type t :: %__MODULE__{
:applicableShippingLabels => list(any()),
:carrierRates => list(GoogleApi.Content.V2.Model.CarrierRate.t()),
:mainTable => GoogleApi.Content.V2.Model.Table.t(),
:name => any(),
:singleValue => GoogleApi.Content.V2.Model.Value.t(),
:subtables => list(GoogleApi.Content.V2.Model.Table.t())
}
field(:applicableShippingLabels, type: :list)
field(:carrierRates, as: GoogleApi.Content.V2.Model.CarrierRate, type: :list)
field(:mainTable, as: GoogleApi.Content.V2.Model.Table)
field(:name)
field(:singleValue, as: GoogleApi.Content.V2.Model.Value)
field(:subtables, as: GoogleApi.Content.V2.Model.Table, type: :list)
end
defimpl Poison.Decoder, for: GoogleApi.Content.V2.Model.RateGroup do
def decode(value, options) do
GoogleApi.Content.V2.Model.RateGroup.decode(value, options)
end
end
defimpl Poison.Encoder, for: GoogleApi.Content.V2.Model.RateGroup do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end