<?php
/**
 * Delivery
 *
 * PHP version 5
 *
 * @category Class
 * @package  ColorMeShop\Swagger
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */

/**
 * カラーミーショップ API
 *
 * # カラーミーショップ API  ## 利用手順  ### OAuthアプリケーションの登録  デベロッパーアカウントをお持ちでない場合は作成します。[デベロッパー登録ページ](https://api.shop-pro.jp/developers/sign_up)から登録してください。  次に、[登録ページ](https://api.shop-pro.jp/oauth/applications/new)からアプリ登録を行ってください。 スマートフォンのWebViewを利用する場合は、リダイレクトURIに`urn:ietf:wg:oauth:2.0:oob`を入力してください。  ### 認可  カラーミーショップアカウントの認証ページを開きます。認証ページのURLは、`https://api.shop-pro.jp/oauth/authorize`に必要なパラメータをつけたものです。  |パラメータ名|値| |---|---| |`client_id`|アプリ詳細画面で確認できるクライアントID| |`response_type`|\"code\"を指定| |`scope`| 別表参照| |`redirect_uri`|アプリ登録時に入力したリダイレクトURI|  `scope`は、以下のうち、アプリが利用したい機能をスペース区切りで指定してください。  |スコープ|機能| |---|---| |`read_products`|商品データの参照| |`write_products`|在庫データの更新| |`read_sales`|受注・顧客データの参照| |`write_sales`|受注データの更新| |`read_shop_coupons`|ショップクーポンの参照|  以下のようなURLとなります。  ``` https://api.shop-pro.jp/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&response_type=code&scope=read_products%20write_products ```  初めてこのページを訪れる場合は、カラーミーショップアカウントのログインIDとパスワードの入力を求められます。  ログイン後の認証ページでアプリとの連携が承認された場合は、`code`というクエリパラメータに認可コードが付与されます。承認がキャンセルされた、またはエラーが起きた場合は、 `error`パラメータにエラーの内容を表す文字列が与えられます。  アプリ登録時のリダイレクトURIに`urn:ietf:wg:oauth:2.0:oob`を指定した場合は、以下のようなURLにリダイレクトされ、 認可コードがURLの末尾に付与されます。  ``` https://api.shop-pro.jp/oauth/authorize/AUTH_CODE ```  認可コードの有効期限は発行から10分間です。  ### 認可コードをアクセストークンに交換  以下のパラメータを付けて、`https://api.shop-pro.jp/oauth/token`へリクエストを送ります。  |パラメータ名|値| |---|---| |`client_id`|アプリ詳細画面に表示されているクライアントID| |`client_secret`|アプリ詳細画面に表示されているクライアントシークレット| |`code`|取得した認可コード| |`grant_type`|\"authorization_code\"を指定| |`redirect_uri`|アプリ登録時に入力したリダイレクトURI|  curlによるリクエストの例を以下に示します。 ```console $ curl -X POST \\   -d'client_id=CLIENT_ID' \\   -d'client_secret=CLIENT_SECRET' \\   -d'code=CODE' \\   -d'grant_type=authorization_code'   \\   -d'redirect_uri=REDIRECT_URI'  \\   'https://api.shop-pro.jp/oauth/token' ```  リクエストが成功すると、以下のようなJSONが返却されます  ```json {   \"access_token\": \"d461ab8XXXXXXXXXXXXXXXXXXXXXXXXX\",   \"token_type\": \"bearer\",   \"scope\": \"read_products write_products\" } ```  アクセストークンに有効期限はありませんが、[許可済みアプリ一覧画面](https://admin.shop-pro.jp/?mode=app_use_lst)から失効させることができます。なお、同じ認可コードをアクセストークンに交換できるのは1度だけです。  ### APIの利用  取得したアクセストークンは、Authorizationヘッダに入れて使用します。以下にショップ情報を取得する例を示します。  ```console $ curl -H 'Authorization: Bearer d461ab8XXXXXXXXXXXXXXXXXXXXXXXXX' https://api.shop-pro.jp/v1/shop.json ```  ## エラー  カラーミーショップAPIでは、以下の形式の配列でエラーを表現します。  - `code` エラーコード - `message` エラーメッセージ - `status` ステータスコード  ```json {   \"errors\": [     {       \"code\": 404100,       \"message\": \"レコードが見つかりませんでした。\",       \"status\": 404     }   ] } ```  ## 都道府県コードについて APIを利用して都道府県コードを更新したり、レスポンスを参照される際には以下の表を参考にしてください。  <details>   <summary>都道府県コード一覧</summary>    |id|都道府県|   |---|---|   |1|北海道|   |2|青森県|   |3|岩手県|   |4|秋田県|   |5|宮城県|   |6|山形県|   |7|福島県|   |8|茨城県|   |9|栃木県|   |10|群馬県|   |11|埼玉県|   |12|千葉県|   |13|東京都|   |14|神奈川県|   |15|新潟県|   |16|福井県|   |17|石川県|   |18|富山県|   |19|静岡県|   |20|山梨県|   |21|長野県|   |22|愛知県|   |23|岐阜県|   |24|三重県|   |25|和歌山県|   |26|滋賀県|   |27|奈良県|   |28|京都府|   |29|大阪府|   |30|兵庫県|   |31|岡山県|   |32|広島県|   |33|鳥取県|   |34|島根県|   |35|山口県|   |36|香川県|   |37|徳島県|   |38|愛媛県|   |39|高知県|   |40|福岡県|   |41|佐賀県|   |42|長崎県|   |43|大分県|   |44|熊本県|   |45|宮崎県|   |46|鹿児島県|   |47|沖縄県|   |48|海外|  </details>
 *
 * OpenAPI spec version: 1.0.0
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 * Swagger Codegen version: 3.0.27
 */
/**
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen
 * Do not edit the class manually.
 */

namespace ColorMeShop\Swagger\Model;

use \ArrayAccess;
use \ColorMeShop\Swagger\ObjectSerializer;

/**
 * Delivery Class Doc Comment
 *
 * @category Class
 * @package  ColorMeShop\Swagger
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */
class Delivery implements ModelInterface, ArrayAccess
{
    const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $swaggerModelName = 'delivery';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerTypes = [
        'id' => 'int',
'account_id' => 'string',
'name' => 'string',
'method_type' => 'string',
'image_url' => 'string',
'charge_free_type' => 'string',
'charge_free_limit' => 'int',
'charge_type' => 'string',
'charge' => '\ColorMeShop\Swagger\Model\DeliveryCharge',
'tax_included' => 'bool',
'slip_number_use' => 'bool',
'slip_number_url' => 'string',
'memo' => 'string',
'memo2' => 'string',
'sort' => 'int',
'display_state' => 'string',
'preferred_date_use' => 'bool',
'preferred_period_use' => 'bool',
'unavailable_payment_ids' => 'int[]',
'make_date' => 'int',
'update_date' => 'int'    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerFormats = [
        'id' => null,
'account_id' => null,
'name' => null,
'method_type' => null,
'image_url' => null,
'charge_free_type' => null,
'charge_free_limit' => null,
'charge_type' => null,
'charge' => null,
'tax_included' => null,
'slip_number_use' => null,
'slip_number_url' => null,
'memo' => null,
'memo2' => null,
'sort' => null,
'display_state' => null,
'preferred_date_use' => null,
'preferred_period_use' => null,
'unavailable_payment_ids' => null,
'make_date' => null,
'update_date' => null    ];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function swaggerTypes()
    {
        return self::$swaggerTypes;
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function swaggerFormats()
    {
        return self::$swaggerFormats;
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'id' => 'id',
'account_id' => 'account_id',
'name' => 'name',
'method_type' => 'method_type',
'image_url' => 'image_url',
'charge_free_type' => 'charge_free_type',
'charge_free_limit' => 'charge_free_limit',
'charge_type' => 'charge_type',
'charge' => 'charge',
'tax_included' => 'tax_included',
'slip_number_use' => 'slip_number_use',
'slip_number_url' => 'slip_number_url',
'memo' => 'memo',
'memo2' => 'memo2',
'sort' => 'sort',
'display_state' => 'display_state',
'preferred_date_use' => 'preferred_date_use',
'preferred_period_use' => 'preferred_period_use',
'unavailable_payment_ids' => 'unavailable_payment_ids',
'make_date' => 'make_date',
'update_date' => 'update_date'    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'id' => 'setId',
'account_id' => 'setAccountId',
'name' => 'setName',
'method_type' => 'setMethodType',
'image_url' => 'setImageUrl',
'charge_free_type' => 'setChargeFreeType',
'charge_free_limit' => 'setChargeFreeLimit',
'charge_type' => 'setChargeType',
'charge' => 'setCharge',
'tax_included' => 'setTaxIncluded',
'slip_number_use' => 'setSlipNumberUse',
'slip_number_url' => 'setSlipNumberUrl',
'memo' => 'setMemo',
'memo2' => 'setMemo2',
'sort' => 'setSort',
'display_state' => 'setDisplayState',
'preferred_date_use' => 'setPreferredDateUse',
'preferred_period_use' => 'setPreferredPeriodUse',
'unavailable_payment_ids' => 'setUnavailablePaymentIds',
'make_date' => 'setMakeDate',
'update_date' => 'setUpdateDate'    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'id' => 'getId',
'account_id' => 'getAccountId',
'name' => 'getName',
'method_type' => 'getMethodType',
'image_url' => 'getImageUrl',
'charge_free_type' => 'getChargeFreeType',
'charge_free_limit' => 'getChargeFreeLimit',
'charge_type' => 'getChargeType',
'charge' => 'getCharge',
'tax_included' => 'getTaxIncluded',
'slip_number_use' => 'getSlipNumberUse',
'slip_number_url' => 'getSlipNumberUrl',
'memo' => 'getMemo',
'memo2' => 'getMemo2',
'sort' => 'getSort',
'display_state' => 'getDisplayState',
'preferred_date_use' => 'getPreferredDateUse',
'preferred_period_use' => 'getPreferredPeriodUse',
'unavailable_payment_ids' => 'getUnavailablePaymentIds',
'make_date' => 'getMakeDate',
'update_date' => 'getUpdateDate'    ];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @return array
     */
    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @return array
     */
    public static function setters()
    {
        return self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @return array
     */
    public static function getters()
    {
        return self::$getters;
    }

    /**
     * The original name of the model.
     *
     * @return string
     */
    public function getModelName()
    {
        return self::$swaggerModelName;
    }

    const METHOD_TYPE_OTHER = 'other';
const METHOD_TYPE_YAMATO = 'yamato';
const METHOD_TYPE_YAMATO_PICKUP = 'yamato_pickup';
const METHOD_TYPE_SAGAWA = 'sagawa';
const METHOD_TYPE_JP = 'jp';
const CHARGE_FREE_TYPE_NOT_FREE = 'not_free';
const CHARGE_FREE_TYPE_FREE = 'free';
const CHARGE_FREE_TYPE_FREE_TO_LIMIT = 'free_to_limit';
const CHARGE_TYPE_FIXED = 'fixed';
const CHARGE_TYPE_BY_PRICE = 'by_price';
const CHARGE_TYPE_BY_AREA = 'by_area';
const CHARGE_TYPE_BY_WEIGHT = 'by_weight';
const DISPLAY_STATE_SHOWING = 'showing';
const DISPLAY_STATE_HIDDEN = 'hidden';

    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getMethodTypeAllowableValues()
    {
        return [
            self::METHOD_TYPE_OTHER,
self::METHOD_TYPE_YAMATO,
self::METHOD_TYPE_YAMATO_PICKUP,
self::METHOD_TYPE_SAGAWA,
self::METHOD_TYPE_JP,        ];
    }
    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getChargeFreeTypeAllowableValues()
    {
        return [
            self::CHARGE_FREE_TYPE_NOT_FREE,
self::CHARGE_FREE_TYPE_FREE,
self::CHARGE_FREE_TYPE_FREE_TO_LIMIT,        ];
    }
    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getChargeTypeAllowableValues()
    {
        return [
            self::CHARGE_TYPE_FIXED,
self::CHARGE_TYPE_BY_PRICE,
self::CHARGE_TYPE_BY_AREA,
self::CHARGE_TYPE_BY_WEIGHT,        ];
    }
    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getDisplayStateAllowableValues()
    {
        return [
            self::DISPLAY_STATE_SHOWING,
self::DISPLAY_STATE_HIDDEN,        ];
    }

    /**
     * Associative array for storing property values
     *
     * @var mixed[]
     */
    protected $container = [];

    /**
     * Constructor
     *
     * @param mixed[] $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(array $data = null)
    {
        $this->container['id'] = isset($data['id']) ? $data['id'] : null;
        $this->container['account_id'] = isset($data['account_id']) ? $data['account_id'] : null;
        $this->container['name'] = isset($data['name']) ? $data['name'] : null;
        $this->container['method_type'] = isset($data['method_type']) ? $data['method_type'] : null;
        $this->container['image_url'] = isset($data['image_url']) ? $data['image_url'] : null;
        $this->container['charge_free_type'] = isset($data['charge_free_type']) ? $data['charge_free_type'] : null;
        $this->container['charge_free_limit'] = isset($data['charge_free_limit']) ? $data['charge_free_limit'] : null;
        $this->container['charge_type'] = isset($data['charge_type']) ? $data['charge_type'] : null;
        $this->container['charge'] = isset($data['charge']) ? $data['charge'] : null;
        $this->container['tax_included'] = isset($data['tax_included']) ? $data['tax_included'] : null;
        $this->container['slip_number_use'] = isset($data['slip_number_use']) ? $data['slip_number_use'] : null;
        $this->container['slip_number_url'] = isset($data['slip_number_url']) ? $data['slip_number_url'] : null;
        $this->container['memo'] = isset($data['memo']) ? $data['memo'] : null;
        $this->container['memo2'] = isset($data['memo2']) ? $data['memo2'] : null;
        $this->container['sort'] = isset($data['sort']) ? $data['sort'] : null;
        $this->container['display_state'] = isset($data['display_state']) ? $data['display_state'] : null;
        $this->container['preferred_date_use'] = isset($data['preferred_date_use']) ? $data['preferred_date_use'] : null;
        $this->container['preferred_period_use'] = isset($data['preferred_period_use']) ? $data['preferred_period_use'] : null;
        $this->container['unavailable_payment_ids'] = isset($data['unavailable_payment_ids']) ? $data['unavailable_payment_ids'] : null;
        $this->container['make_date'] = isset($data['make_date']) ? $data['make_date'] : null;
        $this->container['update_date'] = isset($data['update_date']) ? $data['update_date'] : null;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalidProperties = [];

        $allowedValues = $this->getMethodTypeAllowableValues();
        if (!is_null($this->container['method_type']) && !in_array($this->container['method_type'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'method_type', must be one of '%s'",
                implode("', '", $allowedValues)
            );
        }

        $allowedValues = $this->getChargeFreeTypeAllowableValues();
        if (!is_null($this->container['charge_free_type']) && !in_array($this->container['charge_free_type'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'charge_free_type', must be one of '%s'",
                implode("', '", $allowedValues)
            );
        }

        $allowedValues = $this->getChargeTypeAllowableValues();
        if (!is_null($this->container['charge_type']) && !in_array($this->container['charge_type'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'charge_type', must be one of '%s'",
                implode("', '", $allowedValues)
            );
        }

        $allowedValues = $this->getDisplayStateAllowableValues();
        if (!is_null($this->container['display_state']) && !in_array($this->container['display_state'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'display_state', must be one of '%s'",
                implode("', '", $allowedValues)
            );
        }

        return $invalidProperties;
    }

    /**
     * Validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {
        return count($this->listInvalidProperties()) === 0;
    }


    /**
     * Gets id
     *
     * @return int
     */
    public function getId()
    {
        return $this->container['id'];
    }

    /**
     * Sets id
     *
     * @param int $id 配送方法ID
     *
     * @return $this
     */
    public function setId($id)
    {
        $this->container['id'] = $id;

        return $this;
    }

    /**
     * Gets account_id
     *
     * @return string
     */
    public function getAccountId()
    {
        return $this->container['account_id'];
    }

    /**
     * Sets account_id
     *
     * @param string $account_id ショップアカウントID
     *
     * @return $this
     */
    public function setAccountId($account_id)
    {
        $this->container['account_id'] = $account_id;

        return $this;
    }

    /**
     * Gets name
     *
     * @return string
     */
    public function getName()
    {
        return $this->container['name'];
    }

    /**
     * Sets name
     *
     * @param string $name 配送方法名
     *
     * @return $this
     */
    public function setName($name)
    {
        $this->container['name'] = $name;

        return $this;
    }

    /**
     * Gets method_type
     *
     * @return string
     */
    public function getMethodType()
    {
        return $this->container['method_type'];
    }

    /**
     * Sets method_type
     *
     * @param string $method_type 配送方法区分  - `other`: そのほか - `yamato`: クロネコヤマト - `yamato_pickup`: ヤマト自宅外受け取り - `sagawa`: 佐川急便 - `jp`: 日本郵便
     *
     * @return $this
     */
    public function setMethodType($method_type)
    {
        $allowedValues = $this->getMethodTypeAllowableValues();
        if (!is_null($method_type) && !in_array($method_type, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'method_type', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['method_type'] = $method_type;

        return $this;
    }

    /**
     * Gets image_url
     *
     * @return string
     */
    public function getImageUrl()
    {
        return $this->container['image_url'];
    }

    /**
     * Sets image_url
     *
     * @param string $image_url 配送方法画像URL
     *
     * @return $this
     */
    public function setImageUrl($image_url)
    {
        $this->container['image_url'] = $image_url;

        return $this;
    }

    /**
     * Gets charge_free_type
     *
     * @return string
     */
    public function getChargeFreeType()
    {
        return $this->container['charge_free_type'];
    }

    /**
     * Sets charge_free_type
     *
     * @param string $charge_free_type 配送料が無料になる基準  - `not_free`: 有料 - `free`: 無料 - `free_to_limit`: 注文金額が一定以上の場合は無料
     *
     * @return $this
     */
    public function setChargeFreeType($charge_free_type)
    {
        $allowedValues = $this->getChargeFreeTypeAllowableValues();
        if (!is_null($charge_free_type) && !in_array($charge_free_type, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'charge_free_type', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['charge_free_type'] = $charge_free_type;

        return $this;
    }

    /**
     * Gets charge_free_limit
     *
     * @return int
     */
    public function getChargeFreeLimit()
    {
        return $this->container['charge_free_limit'];
    }

    /**
     * Sets charge_free_limit
     *
     * @param int $charge_free_limit 配送料が無料になる金額。`charge_free_type`が`free_to_limit`の場合のみ意味を持つ
     *
     * @return $this
     */
    public function setChargeFreeLimit($charge_free_limit)
    {
        $this->container['charge_free_limit'] = $charge_free_limit;

        return $this;
    }

    /**
     * Gets charge_type
     *
     * @return string
     */
    public function getChargeType()
    {
        return $this->container['charge_type'];
    }

    /**
     * Sets charge_type
     *
     * @param string $charge_type 配送料の計算方法  - `fixed`: 固定額 - `by_price`: 注文金額によって決定 - `by_area`: 配送先都道府県によって決定 - `by_weight`: 商品重量によって決定
     *
     * @return $this
     */
    public function setChargeType($charge_type)
    {
        $allowedValues = $this->getChargeTypeAllowableValues();
        if (!is_null($charge_type) && !in_array($charge_type, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'charge_type', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['charge_type'] = $charge_type;

        return $this;
    }

    /**
     * Gets charge
     *
     * @return \ColorMeShop\Swagger\Model\DeliveryCharge
     */
    public function getCharge()
    {
        return $this->container['charge'];
    }

    /**
     * Sets charge
     *
     * @param \ColorMeShop\Swagger\Model\DeliveryCharge $charge charge
     *
     * @return $this
     */
    public function setCharge($charge)
    {
        $this->container['charge'] = $charge;

        return $this;
    }

    /**
     * Gets tax_included
     *
     * @return bool
     */
    public function getTaxIncluded()
    {
        return $this->container['tax_included'];
    }

    /**
     * Sets tax_included
     *
     * @param bool $tax_included 送料が税込み料金であるか否か
     *
     * @return $this
     */
    public function setTaxIncluded($tax_included)
    {
        $this->container['tax_included'] = $tax_included;

        return $this;
    }

    /**
     * Gets slip_number_use
     *
     * @return bool
     */
    public function getSlipNumberUse()
    {
        return $this->container['slip_number_use'];
    }

    /**
     * Sets slip_number_use
     *
     * @param bool $slip_number_use 配送伝票番号設定を使用するか否か
     *
     * @return $this
     */
    public function setSlipNumberUse($slip_number_use)
    {
        $this->container['slip_number_use'] = $slip_number_use;

        return $this;
    }

    /**
     * Gets slip_number_url
     *
     * @return string
     */
    public function getSlipNumberUrl()
    {
        return $this->container['slip_number_url'];
    }

    /**
     * Sets slip_number_url
     *
     * @param string $slip_number_url 配送伝票番号確認URL
     *
     * @return $this
     */
    public function setSlipNumberUrl($slip_number_url)
    {
        $this->container['slip_number_url'] = $slip_number_url;

        return $this;
    }

    /**
     * Gets memo
     *
     * @return string
     */
    public function getMemo()
    {
        return $this->container['memo'];
    }

    /**
     * Sets memo
     *
     * @param string $memo 配送方法の説明
     *
     * @return $this
     */
    public function setMemo($memo)
    {
        $this->container['memo'] = $memo;

        return $this;
    }

    /**
     * Gets memo2
     *
     * @return string
     */
    public function getMemo2()
    {
        return $this->container['memo2'];
    }

    /**
     * Sets memo2
     *
     * @param string $memo2 フィーチャーフォン向けショップ用の配送方法説明
     *
     * @return $this
     */
    public function setMemo2($memo2)
    {
        $this->container['memo2'] = $memo2;

        return $this;
    }

    /**
     * Gets sort
     *
     * @return int
     */
    public function getSort()
    {
        return $this->container['sort'];
    }

    /**
     * Sets sort
     *
     * @param int $sort 表示順
     *
     * @return $this
     */
    public function setSort($sort)
    {
        $this->container['sort'] = $sort;

        return $this;
    }

    /**
     * Gets display_state
     *
     * @return string
     */
    public function getDisplayState()
    {
        return $this->container['display_state'];
    }

    /**
     * Sets display_state
     *
     * @param string $display_state 表示状態
     *
     * @return $this
     */
    public function setDisplayState($display_state)
    {
        $allowedValues = $this->getDisplayStateAllowableValues();
        if (!is_null($display_state) && !in_array($display_state, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'display_state', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['display_state'] = $display_state;

        return $this;
    }

    /**
     * Gets preferred_date_use
     *
     * @return bool
     */
    public function getPreferredDateUse()
    {
        return $this->container['preferred_date_use'];
    }

    /**
     * Sets preferred_date_use
     *
     * @param bool $preferred_date_use 配送希望日を指定可能か
     *
     * @return $this
     */
    public function setPreferredDateUse($preferred_date_use)
    {
        $this->container['preferred_date_use'] = $preferred_date_use;

        return $this;
    }

    /**
     * Gets preferred_period_use
     *
     * @return bool
     */
    public function getPreferredPeriodUse()
    {
        return $this->container['preferred_period_use'];
    }

    /**
     * Sets preferred_period_use
     *
     * @param bool $preferred_period_use 配送時間帯を指定可能か
     *
     * @return $this
     */
    public function setPreferredPeriodUse($preferred_period_use)
    {
        $this->container['preferred_period_use'] = $preferred_period_use;

        return $this;
    }

    /**
     * Gets unavailable_payment_ids
     *
     * @return int[]
     */
    public function getUnavailablePaymentIds()
    {
        return $this->container['unavailable_payment_ids'];
    }

    /**
     * Sets unavailable_payment_ids
     *
     * @param int[] $unavailable_payment_ids 利用不可決済方法の配列
     *
     * @return $this
     */
    public function setUnavailablePaymentIds($unavailable_payment_ids)
    {
        $this->container['unavailable_payment_ids'] = $unavailable_payment_ids;

        return $this;
    }

    /**
     * Gets make_date
     *
     * @return int
     */
    public function getMakeDate()
    {
        return $this->container['make_date'];
    }

    /**
     * Sets make_date
     *
     * @param int $make_date 配送方法作成日時
     *
     * @return $this
     */
    public function setMakeDate($make_date)
    {
        $this->container['make_date'] = $make_date;

        return $this;
    }

    /**
     * Gets update_date
     *
     * @return int
     */
    public function getUpdateDate()
    {
        return $this->container['update_date'];
    }

    /**
     * Sets update_date
     *
     * @param int $update_date 配送方法更新日時
     *
     * @return $this
     */
    public function setUpdateDate($update_date)
    {
        $this->container['update_date'] = $update_date;

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     *
     * @param integer $offset Offset
     *
     * @return boolean
     */
    public function offsetExists($offset)
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     *
     * @param integer $offset Offset
     *
     * @return mixed
     */
    public function offsetGet($offset)
    {
        return isset($this->container[$offset]) ? $this->container[$offset] : null;
    }

    /**
     * Sets value based on offset.
     *
     * @param integer $offset Offset
     * @param mixed   $value  Value to be set
     *
     * @return void
     */
    public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     *
     * @param integer $offset Offset
     *
     * @return void
     */
    public function offsetUnset($offset)
    {
        unset($this->container[$offset]);
    }

    /**
     * Gets the string presentation of the object
     *
     * @return string
     */
    public function __toString()
    {
        if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
            return json_encode(
                ObjectSerializer::sanitizeForSerialization($this),
                JSON_PRETTY_PRINT
            );
        }

        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }
}
