uuid: 2e55cb47-aafc-4e2b-96ff-dcc3e3db6893
langcode: en
status: true
dependencies:
  enforced:
    module:
      - commerce_product
      - commerce_license
id: d7_uc_roles_license
class: null
field_plugin_method: null
cck_plugin_method: null
migration_tags:
  - 'Drupal 7'
  - Ubercart
  - Materio
migration_group: d7_materio
label: 'License from D7 Ubercart Roles.'
source:
  plugin: d7_uc_license_role
process:
  type:
    plugin: default_value
    default_value: role
  uid:
    -
      plugin: skip_on_empty
      method: row
      source: uid
    -
      plugin: migration_lookup
      migration: d7_users
      no_stub: true
  state: state
  created: created
  granted: created
  renewed: renewed
  changed: renewed
  license_role:
    plugin: static_map
    source: rid
    map:
      6: adherent
      10: student
  expiration_type:
    plugin: default_value
    default_value:
      target_plugin_id: rolling_interval
      target_plugin_configuration:
        interval:
          interval: 1
          period: year
  expires: expiration
  product_variation:
    plugin: static_map
    source: rid
    map:
      6: 2
      10: 7
destination:
  plugin: 'entity:commerce_license'
  destination_module: commerce_license
migration_dependencies:
  required:
    - d7_users
  optional: {  }
