# vim: set ts=2 sw=2 sts=2 et:
#
# Fixtures
#
# Copyright (c) 2011-present Qualiteam software Ltd. All rights reserved.
# See https://www.x-cart.com/license-agreement.html for license details.

XLite\Model\Payment\Method:
  - service_name: Square
    class: Module\XPay\Square\Model\Payment\Processor\Square
    type: A
    orderby: 0
    adminOrderby: 0
    enabled: 1
    moduleEnabled: 1
    added: 1
    countries: [US, CA, JP, AU, UK]
    translations:
      - code: en
        name: Square
        adminDescription: "Supported countries: US, Canada, Japan, Australia, and the UK."

XLite\Model\Config:
  - name: applicationMode
    category: 'XPay\Square'
    type: 'XLite\Module\XPay\Square\View\FormField\Select\ApplicationMode'
    orderby: 1000
    value: 'prod'
    translations:
      - code: en
        option_name: 'Application Mode'
        option_comment: ''
  - name: applicationId
    category: 'XPay\Square'
    type: text
    orderby: 1010
    value: ''
    translations:
      - code: en
        option_name: 'Application ID'
        option_comment: '1. Get Started: https://docs.connect.squareup.com/get-started; 2. Create App: https://connect.squareup.com/apps'
  - name: applicationSecret
    category: 'XPay\Square'
    type: 'XLite\View\FormField\Input\Secure'
    orderby: 1020
    value: ''
    translations:
      - code: en
        option_name: 'Application Secret'
        option_comment: 'The Square application secret found on the OAuth tab of your Square account. Important: Do not share your Application Secret with anyone. Do not store this value anywhere - you will not need to re-enter it again.'
  - name: locationId
    category: 'XPay\Square'
    type: 'XLite\Module\XPay\Square\View\FormField\Select\LocationId'
    orderby: 1030
    value: ''
    translations:
      - code: en
        option_name: 'Square Location for Online Payments'
        option_comment: 'The square location found in your Square account'
  - name: sandboxApplicationId
    category: 'XPay\Square'
    type: text
    orderby: 1040
    value: ''
    translations:
      - code: en
        option_name: 'Sandbox Application ID'
        option_comment: 'The Sandbox Application Id found in your Square account'
  - name: sandboxAccessToken
    category: 'XPay\Square'
    type: text
    orderby: 1050
    value: ''
    translations:
      - code: en
        option_name: 'Sandbox Access Token'
        option_comment: 'The Sandbox Access Token found in your Square account'
  - name: sandboxLocationId
    category: 'XPay\Square'
    type: text
    orderby: 1060
    value: ''
    translations:
      - code: en
        option_name: 'Sandbox Location ID'
        option_comment: 'The Sandbox Location ID found in your Square account'
  - name: accessToken
    category: 'XPay\Square'
    type: hidden
    orderby: 1070
    value: ''
    translations:
      - code: en
        option_name: 'OAuth Access Token'
        option_comment: 'The OAuth Access Token is retrieved from Square after authorization'
  - name: accessTokenExpiresAt
    category: 'XPay\Square'
    type: hidden
    orderby: 1080
    value: ''
    translations:
      - code: en
        option_name: 'Access Token Expires at'
  - name: refreshToken
    category: 'XPay\Square'
    type: hidden
    orderby: 1085
    value: ''
    translations:
      - code: en
        option_name: 'OAuth Refresh Token'
        option_comment: 'The OAuth Refresh Token is retrieved from Square after authorization or access token refresh'
  - name: merchantId
    category: 'XPay\Square'
    type: hidden
    orderby: 1090
    value: ''
    translations:
      - code: en
        option_name: 'Merchant ID'
        option_comment: 'Square Merchant ID'
  - name: accessTokenUpdatedAt
    category: 'XPay\Square'
    type: hidden
    orderby: 1100
    value: ''
    translations:
      - code: en
        option_name: 'The date when Access Token has been updated last time'
        option_comment: 'The date when Access Token has been updated last time'
  - name: isAutoCapture
    category: 'XPay\Square'
    type: 'XLite\View\FormField\Select\YesNo'
    orderby: 1110
    value: 'N'
    translations:
      - code: en
        option_name: 'Auto capture'
        option_comment: 'Auto capture'
  - name: enableDebug
    category: 'XPay\Square'
    type: 'XLite\View\FormField\Select\YesNo'
    orderby: 1120
    value: 'N'
    translations:
      - code: en
        option_name: 'Enable debug'
        option_comment: 'Enable debug'
  - name: webhookSignatureKey
    category: 'XPay\Square'
    type: text
    orderby: 1130
    value: ''
    translations:
      - code: en
        option_name: 'Webhook signature key'
        option_comment: 'Webhook signature key'
  - name: enablePosSync
    category: 'XPay\Square'
    type: 'XLite\View\FormField\Input\Checkbox\OnOffWithoutOffLabel'
    orderby: 1140
    value: ''
    translations:
      - code: en
        option_name: 'Enable POS synchronization (beta)'
        option_comment: 'If this option is enabled, the store products catalog will be synchronized with Square items catalog'
  - name: syncType
    category: 'XPay\Square'
    type: 'XLite\Module\XPay\Square\View\FormField\Select\SyncType'
    orderby: 1150
    value: 'F'
    translations:
      - code: en
        option_name: 'POS synchronization type'
  - name: useFrequentSync
    category: 'XPay\Square'
    type: 'XLite\View\FormField\Input\Checkbox\OnOffWithoutOffLabel'
    orderby: 1160
    value: ''
    translations:
      - code: en
        option_name: 'Use frequent data POS synchronization'
        option_comment: 'If this option is enabled, the store may operate somewhat slower, but the synchronization of POS state with the store will be faster and more accurate.'

XLite\Model\Task:
  - owner: XLite\Module\XPay\Square\Core\Task\Update
  - owner: XLite\Module\XPay\Square\Core\Task\Load
  - owner: XLite\Module\XPay\Square\Core\Task\RemoveUnsync
