Sha256: 8f5fac82d737f48905faa74192f97f61ca105c9d8cc81f7ad125ed049cc5c2f4

Contents?: true

Size: 1.01 KB

Versions: 6

Compression:

Stored size: 1.01 KB

Contents

# frozen_string_literal: true

# Removemos do array do seeds por enquanto
Spree::PaymentMethod.create_with(
  name: "Store Credit",
  description: "Store credit",
  active: true,
  available_to_admin: false,
  available_to_users: false
).find_or_create_by!(
  type: "Spree::PaymentMethod::StoreCredit"
)

Spree::StoreCreditType.create_with(priority: 1).find_or_create_by!(name: Spree::StoreCreditType::EXPIRING)
Spree::StoreCreditType.create_with(priority: 2).find_or_create_by!(name: Spree::StoreCreditType::NON_EXPIRING)

Spree::ReimbursementType.create_with(name: "Store Credit").find_or_create_by!(type: "Spree::ReimbursementType::StoreCredit")
Spree::ReimbursementType.create_with(name: "Original").find_or_create_by!(type: "Spree::ReimbursementType::OriginalPayment")

Spree::StoreCreditCategory.find_or_create_by!(name: Spree::StoreCreditCategory::GIFT_CARD)
Spree::StoreCreditCategory.find_or_create_by!(name: Spree::StoreCreditCategory::REIMBURSEMENT)

Spree::StoreCreditReason.find_or_create_by!(name: "Credit Given In Error")

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
solidus_brazilian_adaptations-1.4.0 db/spree_br/store_credit.rb
solidus_brazilian_adaptations-1.3.3 db/spree_br/store_credit.rb
solidus_brazilian_adaptations-1.3.2 db/spree_br/store_credit.rb
solidus_brazilian_adaptations-1.3.1 db/spree_br/store_credit.rb
solidus_brazilian_adaptations-1.3.0 db/spree_br/store_credit.rb
solidus_brazilian_adaptations-1.2.0 db/spree_br/store_credit.rb