lib/google_api/content/v21/model/pos_store.ex

# Copyright 2019 Google LLC
#
# 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 file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Content.V21.Model.PosStore do
  @moduledoc """
  Store resource.

  ## Attributes

  *   `gcidCategory` (*type:* `list(String.t)`, *default:* `nil`) - The business type of the store.
  *   `kind` (*type:* `String.t`, *default:* `nil`) - Identifies what kind of resource this is. Value: the fixed string "`content#posStore`"
  *   `matchingStatus` (*type:* `String.t`, *default:* `nil`) - Output only. The matching status of POS store and Google Business Profile store. Possible values are: - "`matched`": The POS store is successfully matched with the Google Business Profile store. - "`failed`": The POS store is not matched with the Google Business Profile store. See matching_status_hint for further details. Note that there is up to 48 hours propagation delay for changes in Merchant Center (e.g. creation of new account, accounts linking) and Google Business Profile (e.g. store address update) which may affect the matching status. In such cases, after a delay call [pos.list](https://developers.google.com/shopping-content/reference/rest/v2.1/pos/list) to retrieve the updated matching status. 
  *   `matchingStatusHint` (*type:* `String.t`, *default:* `nil`) - Output only. The hint of why the matching has failed. This is only set when matching_status=failed. Possible values are: - "`linked-store-not-found`": There aren't any Google Business Profile stores available for matching. Connect your Merchant Center account with the Google Business Profile account. Or add a new Google Business Profile store corresponding to the POS store. - "`store-match-not-found`": The provided POS store couldn't be matched to any of the connected Google Business Profile stores. Merchant Center account is connected correctly and stores are available on Google Business Profile, but POS store location address does not match with Google Business Profile stores' addresses. Update POS store address or Google Business Profile store address to match correctly. - "`store-match-unverified`": The provided POS store couldn't be matched to any of the connected Google Business Profile stores, as the matched Google Business Profile store is unverified. Go through the Google Business Profile verification process to match correctly. 
  *   `phoneNumber` (*type:* `String.t`, *default:* `nil`) - The store phone number.
  *   `placeId` (*type:* `String.t`, *default:* `nil`) - The Google Place Id of the store location.
  *   `storeAddress` (*type:* `String.t`, *default:* `nil`) - Required. The street address of the store.
  *   `storeCode` (*type:* `String.t`, *default:* `nil`) - Required. A store identifier that is unique for the given merchant.
  *   `storeName` (*type:* `String.t`, *default:* `nil`) - The merchant or store name.
  *   `websiteUrl` (*type:* `String.t`, *default:* `nil`) - The website url for the store or merchant.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :gcidCategory => list(String.t()) | nil,
          :kind => String.t() | nil,
          :matchingStatus => String.t() | nil,
          :matchingStatusHint => String.t() | nil,
          :phoneNumber => String.t() | nil,
          :placeId => String.t() | nil,
          :storeAddress => String.t() | nil,
          :storeCode => String.t() | nil,
          :storeName => String.t() | nil,
          :websiteUrl => String.t() | nil
        }

  field(:gcidCategory, type: :list)
  field(:kind)
  field(:matchingStatus)
  field(:matchingStatusHint)
  field(:phoneNumber)
  field(:placeId)
  field(:storeAddress)
  field(:storeCode)
  field(:storeName)
  field(:websiteUrl)
end

defimpl Poison.Decoder, for: GoogleApi.Content.V21.Model.PosStore do
  def decode(value, options) do
    GoogleApi.Content.V21.Model.PosStore.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Content.V21.Model.PosStore do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end