forked from zuorasc/zuora
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
570cd42
commit 93936b3
Showing
17 changed files
with
110 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FactoryGirl.define do | ||
FactoryBot.define do | ||
factory :contact, :class => Zuora::Objects::Contact do | ||
first_name "Example" | ||
first_name { "Example" } | ||
sequence(:last_name){|n| "User #{n}" } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,36 @@ | ||
FactoryGirl.define do | ||
FactoryBot.define do | ||
factory :payment_method_credit_card, :class => Zuora::Objects::PaymentMethod do | ||
type "CreditCard" | ||
credit_card_address1 "123 Testing Lane" | ||
credit_card_city "San Francisco" | ||
credit_card_state "California" | ||
credit_card_postal_code "95611" | ||
credit_card_holder_name "Example User" | ||
credit_card_number "4111111111111111" | ||
credit_card_type "Visa" | ||
credit_card_expiration_month "9" | ||
credit_card_expiration_year "2018" | ||
type { "CreditCard" } | ||
credit_card_address1 { "123 Testing Lane" } | ||
credit_card_city { "San Francisco" } | ||
credit_card_state { "California" } | ||
credit_card_postal_code { "95611" } | ||
credit_card_holder_name { "Example User" } | ||
credit_card_number { "4111111111111111" } | ||
credit_card_type { "Visa" } | ||
credit_card_expiration_month { "9" } | ||
credit_card_expiration_year { "2018" } | ||
end | ||
|
||
factory :payment_method_debit_card, :parent => :payment_method_credit_card do | ||
type "DebitCard" | ||
type { "DebitCard" } | ||
end | ||
|
||
factory :payment_method_ach, :class => Zuora::Objects::PaymentMethod do | ||
type "ACH" | ||
ach_aba_code '123456789' | ||
ach_account_name 'My Checking Account' | ||
ach_account_number '987654321' | ||
ach_bank_name 'Bank of Zuora' | ||
ach_account_type 'BusinessChecking' | ||
end | ||
FactoryBot.define do | ||
factory :payment_method_ach, class: Zuora::Objects::PaymentMethod do | ||
type { "ACH" } | ||
ach_aba_code { '123456789' } | ||
ach_account_name { 'My Checking Account' } | ||
ach_account_number { '987654321' } | ||
ach_bank_name { 'Bank of Zuora' } | ||
ach_account_type { 'BusinessChecking' } | ||
end | ||
|
||
factory :payment_method_paypal, :class => Zuora::Objects::PaymentMethod do | ||
type 'PayPal' | ||
paypal_baid "ExampleBillingAgreementId" | ||
paypal_email "example@example.org" | ||
paypal_type "ExpressCheckout" | ||
factory :payment_method_paypal, class: Zuora::Objects::PaymentMethod do | ||
type { 'PayPal' } | ||
paypal_baid { "ExampleBillingAgreementId" } | ||
paypal_email { "example@example.org" } | ||
paypal_type { "ExpressCheckout" } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
FactoryGirl.define do | ||
FactoryBot.define do | ||
factory :product_rate_plan_charge_tier, :class => Zuora::Objects::ProductRatePlanChargeTier do | ||
price 0 | ||
starting_unit 0 | ||
ending_unit 10 | ||
price { 0 } | ||
starting_unit { 0 } | ||
ending_unit { 10 } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
FactoryGirl.define do | ||
factory :product_rate_plan_charge, :class => Zuora::Objects::ProductRatePlanCharge do | ||
FactoryBot.define do | ||
factory :product_rate_plan_charge, class: Zuora::Objects::ProductRatePlanCharge do | ||
association :product_rate_plan | ||
sequence(:name){|n| "Rate Plan Charge #{n}"} | ||
bill_cycle_type "DefaultFromCustomer" | ||
billing_period "Month" | ||
billing_period_alignment "AlignToCharge" | ||
charge_model "Volume Pricing" | ||
charge_type "Recurring" | ||
included_units "1" | ||
smoothing_model "Rollover" | ||
uom "Each" | ||
trigger_event "ServiceActivation" | ||
after_build do |prpc| | ||
prpc.product_rate_plan_charge_tiers << FactoryGirl.build(:product_rate_plan_charge_tier) | ||
bill_cycle_type { "DefaultFromCustomer" } | ||
billing_period { "Month" } | ||
billing_period_alignment { "AlignToCharge" } | ||
charge_model { "Volume Pricing" } | ||
charge_type { "Recurring" } | ||
included_units { "1" } | ||
smoothing_model { "Rollover" } | ||
uom { "Each" } | ||
trigger_event { "ServiceActivation" } | ||
after(:build) do |prpc| | ||
prpc.product_rate_plan_charge_tiers << FactoryBot.build(:product_rate_plan_charge_tier) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
FactoryGirl.define do | ||
factory :product_rate_plan, :class => Zuora::Objects::ProductRatePlan do | ||
FactoryBot.define do | ||
factory :product_rate_plan, class: Zuora::Objects::ProductRatePlan do | ||
sequence(:name){|n| "Rate Plan #{n}"} | ||
association :product | ||
effective_start_date DateTime.now | ||
effective_end_date DateTime.now + 10.days | ||
effective_start_date { DateTime.now } | ||
effective_end_date { DateTime.now + 10.days } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
FactoryGirl.define do | ||
factory :product, :class => Zuora::Objects::Product do | ||
sequence(:name){|n| "Example Product #{n}"} | ||
effective_start_date DateTime.now | ||
effective_end_date DateTime.now + 10.days | ||
FactoryBot.define do | ||
factory :product, class: Zuora::Objects::Product do | ||
sequence(:name) { |n| "Example Product #{n}" } | ||
effective_start_date { DateTime.now } | ||
effective_end_date { DateTime.now + 10.days } | ||
end | ||
|
||
factory :product_catalog, :parent => :product do | ||
after_create do |product| | ||
rate_plan = FactoryGirl.create(:product_rate_plan, :product => product) | ||
FactoryGirl.create(:product_rate_plan_charge, :product_rate_plan => rate_plan) | ||
factory :product_catalog, parent: :product do | ||
after(:create) do |product| | ||
rate_plan = FactoryBot.create(:product_rate_plan, product: product) | ||
FactoryBot.create(:product_rate_plan_charge, product_rate_plan: rate_plan) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
FactoryGirl.define do | ||
factory :subscription, :class => Zuora::Objects::Subscription do | ||
contract_effective_date DateTime.now | ||
sequence(:name){|n| "Example Subscription #{n}"} | ||
term_start_date DateTime.now | ||
FactoryBot.define do | ||
factory :subscription, class: Zuora::Objects::Subscription do | ||
contract_effective_date { DateTime.now } | ||
sequence(:name) { |n| "Example Subscription #{n}" } | ||
term_start_date { DateTime.now } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.