# frozen_string_literal: true

describe Country do
  describe "#supports_stripe_cross_border_payouts?" do
    it "returns true if country only supports cross-border payouts via stripe otherwise returns false" do
      expect(Country.new("US").supports_stripe_cross_border_payouts?).to be false
      expect(Country.new("GB").supports_stripe_cross_border_payouts?).to be false
      expect(Country.new("AU").supports_stripe_cross_border_payouts?).to be false
      expect(Country.new("FR").supports_stripe_cross_border_payouts?).to be false
      expect(Country.new("TH").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("KR").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("AE").supports_stripe_cross_border_payouts?).to be false
      expect(Country.new("ET").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("BN").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("GY").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("GT").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("IL").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("TT").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("PH").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("MX").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("SE").supports_stripe_cross_border_payouts?).to be false
      expect(Country.new("RO").supports_stripe_cross_border_payouts?).to be false
      expect(Country.new("NO").supports_stripe_cross_border_payouts?).to be false
      expect(Country.new("AR").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("PE").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("IN").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("TW").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("VN").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("NA").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("AG").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("TZ").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("ID").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("AL").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("JO").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("NG").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("AZ").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("BH").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("CR").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("CL").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("PK").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("BA").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("TR").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("BW").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("MA").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("RS").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("ZA").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("KE").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("EG").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("CO").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("AO").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("NE").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("SM").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("SA").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("KZ").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("EC").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("LI").supports_stripe_cross_border_payouts?).to be false
      expect(Country.new("JP").supports_stripe_cross_border_payouts?).to be false
      expect(Country.new("MY").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("GI").supports_stripe_cross_border_payouts?).to be false
      expect(Country.new("UY").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("RW").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("MU").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("JM").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("OM").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("DO").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("UZ").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("BO").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("TN").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("MD").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("PA").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("SV").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("BD").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("BT").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("LA").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("MZ").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("MG").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("PY").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("GH").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("AM").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("LK").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("KW").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("MK").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("IS").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("QA").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("BS").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("LC").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("SN").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("KH").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("MN").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("GA").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("MC").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("DZ").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("MO").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("BJ").supports_stripe_cross_border_payouts?).to be true
      expect(Country.new("CI").supports_stripe_cross_border_payouts?).to be true
    end
  end

  describe "#can_accept_stripe_charges?" do
    it "returns true if country supports payments via stripe otherwise returns false" do
      expect(Country.new("US").can_accept_stripe_charges?).to be true
      expect(Country.new("GB").can_accept_stripe_charges?).to be true
      expect(Country.new("AU").can_accept_stripe_charges?).to be true
      expect(Country.new("FR").can_accept_stripe_charges?).to be true
      expect(Country.new("TH").can_accept_stripe_charges?).to be false
      expect(Country.new("KR").can_accept_stripe_charges?).to be false
      expect(Country.new("AE").can_accept_stripe_charges?).to be true
      expect(Country.new("IL").can_accept_stripe_charges?).to be false
      expect(Country.new("TT").can_accept_stripe_charges?).to be false
      expect(Country.new("PH").can_accept_stripe_charges?).to be false
      expect(Country.new("MX").can_accept_stripe_charges?).to be false
      expect(Country.new("SE").can_accept_stripe_charges?).to be true
      expect(Country.new("RO").can_accept_stripe_charges?).to be true
      expect(Country.new("NO").can_accept_stripe_charges?).to be true
      expect(Country.new("AR").can_accept_stripe_charges?).to be false
      expect(Country.new("PE").can_accept_stripe_charges?).to be false
      expect(Country.new("NA").can_accept_stripe_charges?).to be false
      expect(Country.new("ET").can_accept_stripe_charges?).to be false
      expect(Country.new("BN").can_accept_stripe_charges?).to be false
      expect(Country.new("GY").can_accept_stripe_charges?).to be false
      expect(Country.new("GT").can_accept_stripe_charges?).to be false
      expect(Country.new("AG").can_accept_stripe_charges?).to be false
      expect(Country.new("TZ").can_accept_stripe_charges?).to be false
      expect(Country.new("IN").can_accept_stripe_charges?).to be false
      expect(Country.new("TW").can_accept_stripe_charges?).to be false
      expect(Country.new("AL").can_accept_stripe_charges?).to be false
      expect(Country.new("BH").can_accept_stripe_charges?).to be false
      expect(Country.new("RW").can_accept_stripe_charges?).to be false
      expect(Country.new("JO").can_accept_stripe_charges?).to be false
      expect(Country.new("NG").can_accept_stripe_charges?).to be false
      expect(Country.new("AZ").can_accept_stripe_charges?).to be false
      expect(Country.new("VN").can_accept_stripe_charges?).to be false
      expect(Country.new("ID").can_accept_stripe_charges?).to be false
      expect(Country.new("CR").can_accept_stripe_charges?).to be false
      expect(Country.new("BD").can_accept_stripe_charges?).to be false
      expect(Country.new("BT").can_accept_stripe_charges?).to be false
      expect(Country.new("LA").can_accept_stripe_charges?).to be false
      expect(Country.new("MZ").can_accept_stripe_charges?).to be false
      expect(Country.new("CL").can_accept_stripe_charges?).to be false
      expect(Country.new("BW").can_accept_stripe_charges?).to be false
      expect(Country.new("PK").can_accept_stripe_charges?).to be false
      expect(Country.new("TR").can_accept_stripe_charges?).to be false
      expect(Country.new("LI").can_accept_stripe_charges?).to be true
      expect(Country.new("BA").can_accept_stripe_charges?).to be false
      expect(Country.new("MA").can_accept_stripe_charges?).to be false
      expect(Country.new("RS").can_accept_stripe_charges?).to be false
      expect(Country.new("ZA").can_accept_stripe_charges?).to be false
      expect(Country.new("KE").can_accept_stripe_charges?).to be false
      expect(Country.new("EG").can_accept_stripe_charges?).to be false
      expect(Country.new("AO").can_accept_stripe_charges?).to be false
      expect(Country.new("NE").can_accept_stripe_charges?).to be false
      expect(Country.new("SM").can_accept_stripe_charges?).to be false
      expect(Country.new("CO").can_accept_stripe_charges?).to be false
      expect(Country.new("SA").can_accept_stripe_charges?).to be false
      expect(Country.new("KZ").can_accept_stripe_charges?).to be false
      expect(Country.new("EC").can_accept_stripe_charges?).to be false
      expect(Country.new("JP").can_accept_stripe_charges?).to be true
      expect(Country.new("MY").can_accept_stripe_charges?).to be false
      expect(Country.new("GI").can_accept_stripe_charges?).to be true
      expect(Country.new("UY").can_accept_stripe_charges?).to be false
      expect(Country.new("MU").can_accept_stripe_charges?).to be false
      expect(Country.new("JM").can_accept_stripe_charges?).to be false
      expect(Country.new("OM").can_accept_stripe_charges?).to be false
      expect(Country.new("DO").can_accept_stripe_charges?).to be false
      expect(Country.new("UZ").can_accept_stripe_charges?).to be false
      expect(Country.new("BO").can_accept_stripe_charges?).to be false
      expect(Country.new("TN").can_accept_stripe_charges?).to be false
      expect(Country.new("MD").can_accept_stripe_charges?).to be false
      expect(Country.new("PA").can_accept_stripe_charges?).to be false
      expect(Country.new("SV").can_accept_stripe_charges?).to be false
      expect(Country.new("MG").can_accept_stripe_charges?).to be false
      expect(Country.new("PY").can_accept_stripe_charges?).to be false
      expect(Country.new("GH").can_accept_stripe_charges?).to be false
      expect(Country.new("AM").can_accept_stripe_charges?).to be false
      expect(Country.new("LK").can_accept_stripe_charges?).to be false
      expect(Country.new("KW").can_accept_stripe_charges?).to be false
      expect(Country.new("MK").can_accept_stripe_charges?).to be false
      expect(Country.new("IS").can_accept_stripe_charges?).to be false
      expect(Country.new("QA").can_accept_stripe_charges?).to be false
      expect(Country.new("BS").can_accept_stripe_charges?).to be false
      expect(Country.new("LC").can_accept_stripe_charges?).to be false
      expect(Country.new("SN").can_accept_stripe_charges?).to be false
      expect(Country.new("KH").can_accept_stripe_charges?).to be false
      expect(Country.new("MN").can_accept_stripe_charges?).to be false
      expect(Country.new("GA").can_accept_stripe_charges?).to be false
      expect(Country.new("MC").can_accept_stripe_charges?).to be false
      expect(Country.new("DZ").can_accept_stripe_charges?).to be false
      expect(Country.new("MO").can_accept_stripe_charges?).to be false
      expect(Country.new("BJ").can_accept_stripe_charges?).to be false
      expect(Country.new("CI").can_accept_stripe_charges?).to be false
    end
  end

  describe "#stripe_capabilities" do
    it "returns country-specific stripe capabilities" do
      expect(Country.new("US").stripe_capabilities).to eq StripeMerchantAccountManager::REQUESTED_CAPABILITIES
      expect(Country.new("GB").stripe_capabilities).to eq StripeMerchantAccountManager::REQUESTED_CAPABILITIES
      expect(Country.new("AU").stripe_capabilities).to eq StripeMerchantAccountManager::REQUESTED_CAPABILITIES
      expect(Country.new("FR").stripe_capabilities).to eq StripeMerchantAccountManager::REQUESTED_CAPABILITIES
      expect(Country.new("TH").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("KR").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("AE").stripe_capabilities).to eq StripeMerchantAccountManager::REQUESTED_CAPABILITIES
      expect(Country.new("IL").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("TT").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("PH").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("MX").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("SE").stripe_capabilities).to eq StripeMerchantAccountManager::REQUESTED_CAPABILITIES
      expect(Country.new("RO").stripe_capabilities).to eq StripeMerchantAccountManager::REQUESTED_CAPABILITIES
      expect(Country.new("LI").stripe_capabilities).to eq StripeMerchantAccountManager::REQUESTED_CAPABILITIES
      expect(Country.new("NO").stripe_capabilities).to eq StripeMerchantAccountManager::REQUESTED_CAPABILITIES
      expect(Country.new("BD").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("BT").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("LA").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("MZ").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("AR").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("PE").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("AL").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("BH").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("NA").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("AG").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("TZ").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("JO").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("ET").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("BN").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("GY").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("GT").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("NG").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("AZ").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("IN").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("TW").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("BA").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("VN").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("ID").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("CR").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("CL").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("PK").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("TR").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("MA").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("RS").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("ZA").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("KE").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("EG").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("CO").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("AO").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("NE").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("SM").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("SA").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("KZ").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("EC").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("BW").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("JP").stripe_capabilities).to eq StripeMerchantAccountManager::REQUESTED_CAPABILITIES
      expect(Country.new("MY").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("GI").stripe_capabilities).to eq StripeMerchantAccountManager::REQUESTED_CAPABILITIES
      expect(Country.new("UY").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("MU").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("JM").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("OM").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("RW").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("DO").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("UZ").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("BO").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("TN").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("MD").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("PA").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("SV").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("MG").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("PY").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("GH").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("AM").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("LK").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("KW").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("MK").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("IS").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("QA").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("BS").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("LC").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("SN").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("KH").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("MN").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("GA").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("MC").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("DZ").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("MO").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("BJ").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
      expect(Country.new("CI").stripe_capabilities).to eq StripeMerchantAccountManager::CROSS_BORDER_PAYOUTS_ONLY_CAPABILITIES
    end
  end

  describe "#default_currency" do
    it "returns the currency which is set as default currency for all the accounts from the country" do
      expect(Country.new("US").default_currency).to eq Currency::USD
      expect(Country.new("GB").default_currency).to eq Currency::GBP
      expect(Country.new("AU").default_currency).to eq Currency::AUD
      expect(Country.new("FR").default_currency).to eq Currency::EUR
      expect(Country.new("TH").default_currency).to eq nil
      expect(Country.new("KR").default_currency).to eq nil
      expect(Country.new("AE").default_currency).to eq nil
      expect(Country.new("IL").default_currency).to eq nil
      expect(Country.new("TT").default_currency).to eq nil
      expect(Country.new("ET").default_currency).to eq nil
      expect(Country.new("BN").default_currency).to eq nil
      expect(Country.new("GY").default_currency).to eq nil
      expect(Country.new("GT").default_currency).to eq nil
      expect(Country.new("PH").default_currency).to eq nil
      expect(Country.new("NA").default_currency).to eq nil
      expect(Country.new("AG").default_currency).to eq nil
      expect(Country.new("TZ").default_currency).to eq nil
      expect(Country.new("MX").default_currency).to eq nil
      expect(Country.new("SE").default_currency).to eq nil
      expect(Country.new("RO").default_currency).to eq nil
      expect(Country.new("AR").default_currency).to eq nil
      expect(Country.new("PE").default_currency).to eq nil
      expect(Country.new("NO").default_currency).to eq nil
      expect(Country.new("IN").default_currency).to eq nil
      expect(Country.new("TW").default_currency).to eq nil
      expect(Country.new("VN").default_currency).to eq nil
      expect(Country.new("BD").default_currency).to eq nil
      expect(Country.new("BT").default_currency).to eq nil
      expect(Country.new("LA").default_currency).to eq nil
      expect(Country.new("MZ").default_currency).to eq nil
      expect(Country.new("LI").default_currency).to eq Currency::CHF
      expect(Country.new("ID").default_currency).to eq nil
      expect(Country.new("CR").default_currency).to eq nil
      expect(Country.new("CL").default_currency).to eq nil
      expect(Country.new("PK").default_currency).to eq nil
      expect(Country.new("AO").default_currency).to eq nil
      expect(Country.new("NE").default_currency).to eq nil
      expect(Country.new("SM").default_currency).to eq nil
      expect(Country.new("BA").default_currency).to eq nil
      expect(Country.new("TR").default_currency).to eq nil
      expect(Country.new("MA").default_currency).to eq nil
      expect(Country.new("RS").default_currency).to eq nil
      expect(Country.new("ZA").default_currency).to eq nil
      expect(Country.new("KE").default_currency).to eq nil
      expect(Country.new("EG").default_currency).to eq nil
      expect(Country.new("CO").default_currency).to eq nil
      expect(Country.new("SA").default_currency).to eq nil
      expect(Country.new("BW").default_currency).to eq nil
      expect(Country.new("KZ").default_currency).to eq nil
      expect(Country.new("EC").default_currency).to eq nil
      expect(Country.new("JP").default_currency).to eq Currency::JPY
      expect(Country.new("MY").default_currency).to eq nil
      expect(Country.new("GI").default_currency).to eq nil
      expect(Country.new("UY").default_currency).to eq nil
      expect(Country.new("MU").default_currency).to eq nil
      expect(Country.new("JM").default_currency).to eq nil
      expect(Country.new("OM").default_currency).to eq nil
      expect(Country.new("DO").default_currency).to eq nil
      expect(Country.new("UZ").default_currency).to eq nil
      expect(Country.new("BO").default_currency).to eq nil
      expect(Country.new("TN").default_currency).to eq nil
      expect(Country.new("RW").default_currency).to eq nil
      expect(Country.new("AL").default_currency).to eq nil
      expect(Country.new("AZ").default_currency).to eq nil
      expect(Country.new("BH").default_currency).to eq nil
      expect(Country.new("NG").default_currency).to eq nil
      expect(Country.new("JO").default_currency).to eq nil
      expect(Country.new("MD").default_currency).to eq nil
      expect(Country.new("PA").default_currency).to eq nil
      expect(Country.new("SV").default_currency).to eq nil
      expect(Country.new("MG").default_currency).to eq nil
      expect(Country.new("PY").default_currency).to eq nil
      expect(Country.new("GH").default_currency).to eq nil
      expect(Country.new("AM").default_currency).to eq nil
      expect(Country.new("LK").default_currency).to eq nil
      expect(Country.new("KW").default_currency).to eq nil
      expect(Country.new("MK").default_currency).to eq nil
      expect(Country.new("IS").default_currency).to eq nil
      expect(Country.new("QA").default_currency).to eq nil
      expect(Country.new("BS").default_currency).to eq nil
      expect(Country.new("LC").default_currency).to eq nil
      expect(Country.new("SN").default_currency).to eq nil
      expect(Country.new("KH").default_currency).to eq nil
      expect(Country.new("MN").default_currency).to eq nil
      expect(Country.new("GA").default_currency).to eq nil
      expect(Country.new("MC").default_currency).to eq nil
      expect(Country.new("DZ").default_currency).to eq nil
      expect(Country.new("MO").default_currency).to eq nil
      expect(Country.new("BJ").default_currency).to eq nil
      expect(Country.new("CI").default_currency).to eq nil
    end
  end

  describe "#payout_currency" do
    it "returns the currency which is used for sending stripe payouts to the country" do
      expect(Country.new("US").payout_currency).to eq Currency::USD
      expect(Country.new("GB").payout_currency).to eq Currency::GBP
      expect(Country.new("AU").payout_currency).to eq Currency::AUD
      expect(Country.new("FR").payout_currency).to eq Currency::EUR
      expect(Country.new("TH").payout_currency).to eq Currency::THB
      expect(Country.new("KR").payout_currency).to eq Currency::KRW
      expect(Country.new("AE").payout_currency).to eq Currency::AED
      expect(Country.new("IL").payout_currency).to eq Currency::ILS
      expect(Country.new("TT").payout_currency).to eq Currency::TTD
      expect(Country.new("PH").payout_currency).to eq Currency::PHP
      expect(Country.new("AL").payout_currency).to eq Currency::ALL
      expect(Country.new("JO").payout_currency).to eq Currency::JOD
      expect(Country.new("AZ").payout_currency).to eq Currency::AZN
      expect(Country.new("BH").payout_currency).to eq Currency::BHD
      expect(Country.new("ET").payout_currency).to eq Currency::ETB
      expect(Country.new("BN").payout_currency).to eq Currency::BND
      expect(Country.new("GY").payout_currency).to eq Currency::GYD
      expect(Country.new("GT").payout_currency).to eq Currency::GTQ
      expect(Country.new("NG").payout_currency).to eq Currency::NGN
      expect(Country.new("MX").payout_currency).to eq Currency::MXN
      expect(Country.new("SE").payout_currency).to eq Currency::SEK
      expect(Country.new("NA").payout_currency).to eq Currency::NAD
      expect(Country.new("AG").payout_currency).to eq Currency::XCD
      expect(Country.new("TZ").payout_currency).to eq Currency::TZS
      expect(Country.new("RO").payout_currency).to eq Currency::RON
      expect(Country.new("NO").payout_currency).to eq Currency::NOK
      expect(Country.new("AR").payout_currency).to eq Currency::ARS
      expect(Country.new("PE").payout_currency).to eq Currency::PEN
      expect(Country.new("IN").payout_currency).to eq Currency::INR
      expect(Country.new("LI").payout_currency).to eq Currency::CHF
      expect(Country.new("TW").payout_currency).to eq Currency::TWD
      expect(Country.new("VN").payout_currency).to eq Currency::VND
      expect(Country.new("ID").payout_currency).to eq Currency::IDR
      expect(Country.new("CR").payout_currency).to eq Currency::CRC
      expect(Country.new("CL").payout_currency).to eq Currency::CLP
      expect(Country.new("PK").payout_currency).to eq Currency::PKR
      expect(Country.new("TR").payout_currency).to eq Currency::TRY
      expect(Country.new("MA").payout_currency).to eq Currency::MAD
      expect(Country.new("BA").payout_currency).to eq Currency::BAM
      expect(Country.new("RS").payout_currency).to eq Currency::RSD
      expect(Country.new("ZA").payout_currency).to eq Currency::ZAR
      expect(Country.new("KE").payout_currency).to eq Currency::KES
      expect(Country.new("RW").payout_currency).to eq Currency::RWF
      expect(Country.new("EG").payout_currency).to eq Currency::EGP
      expect(Country.new("BD").payout_currency).to eq Currency::BDT
      expect(Country.new("BT").payout_currency).to eq Currency::BTN
      expect(Country.new("LA").payout_currency).to eq Currency::LAK
      expect(Country.new("MZ").payout_currency).to eq Currency::MZN
      expect(Country.new("CO").payout_currency).to eq Currency::COP
      expect(Country.new("BW").payout_currency).to eq Currency::BWP
      expect(Country.new("SA").payout_currency).to eq Currency::SAR
      expect(Country.new("JP").payout_currency).to eq Currency::JPY
      expect(Country.new("KZ").payout_currency).to eq Currency::KZT
      expect(Country.new("EC").payout_currency).to eq Currency::USD
      expect(Country.new("MY").payout_currency).to eq Currency::MYR
      expect(Country.new("UY").payout_currency).to eq Currency::UYU
      expect(Country.new("MU").payout_currency).to eq Currency::MUR
      expect(Country.new("JM").payout_currency).to eq Currency::JMD
      expect(Country.new("DO").payout_currency).to eq Currency::DOP
      expect(Country.new("UZ").payout_currency).to eq Currency::UZS
      expect(Country.new("BO").payout_currency).to eq Currency::BOB
      expect(Country.new("MD").payout_currency).to eq Currency::MDL
      expect(Country.new("PA").payout_currency).to eq Currency::USD
      expect(Country.new("SV").payout_currency).to eq Currency::USD
      expect(Country.new("GI").payout_currency).to eq Currency::GBP
      expect(Country.new("OM").payout_currency).to eq Currency::OMR
      expect(Country.new("AO").payout_currency).to eq Currency::AOA
      expect(Country.new("NE").payout_currency).to eq Currency::XOF
      expect(Country.new("SM").payout_currency).to eq Currency::EUR
      expect(Country.new("TN").payout_currency).to eq Currency::TND
      expect(Country.new("MG").payout_currency).to eq Currency::MGA
      expect(Country.new("PY").payout_currency).to eq Currency::PYG
      expect(Country.new("GH").payout_currency).to eq Currency::GHS
      expect(Country.new("AM").payout_currency).to eq Currency::AMD
      expect(Country.new("LK").payout_currency).to eq Currency::LKR
      expect(Country.new("KW").payout_currency).to eq Currency::KWD
      expect(Country.new("MK").payout_currency).to eq Currency::MKD
      expect(Country.new("IS").payout_currency).to eq Currency::EUR
      expect(Country.new("QA").payout_currency).to eq Currency::QAR
      expect(Country.new("BS").payout_currency).to eq Currency::BSD
      expect(Country.new("LC").payout_currency).to eq Currency::XCD
      expect(Country.new("SN").payout_currency).to eq Currency::XOF
      expect(Country.new("KH").payout_currency).to eq Currency::KHR
      expect(Country.new("MN").payout_currency).to eq Currency::MNT
      expect(Country.new("GA").payout_currency).to eq Currency::XAF
      expect(Country.new("MC").payout_currency).to eq Currency::EUR
      expect(Country.new("DZ").payout_currency).to eq Currency::DZD
      expect(Country.new("MO").payout_currency).to eq Currency::MOP
      expect(Country.new("BJ").payout_currency).to eq Currency::XOF
      expect(Country.new("CI").payout_currency).to eq Currency::XOF
    end
  end

  describe "#min_cross_border_payout_amount_local_cents" do
    it "returns the correct minimum payout amount in local currency cents for supported cross-border countries" do
      expect(Country.new("TH").min_cross_border_payout_amount_local_cents).to eq 600_00
      expect(Country.new("KR").min_cross_border_payout_amount_local_cents).to eq 40_000_00
      expect(Country.new("NA").min_cross_border_payout_amount_local_cents).to eq 550_00
      expect(Country.new("PH").min_cross_border_payout_amount_local_cents).to eq 20_00
      expect(Country.new("MX").min_cross_border_payout_amount_local_cents).to eq 10_00
      expect(Country.new("BO").min_cross_border_payout_amount_local_cents).to eq 200_00
      expect(Country.new("UZ").min_cross_border_payout_amount_local_cents).to eq 343_000_00
      expect(Country.new("GY").min_cross_border_payout_amount_local_cents).to eq 6_300_00
      expect(Country.new("KH").min_cross_border_payout_amount_local_cents).to eq 123_000_00
      expect(Country.new("MN").min_cross_border_payout_amount_local_cents).to eq 105_000_00
      expect(Country.new("AO").min_cross_border_payout_amount_local_cents).to eq 23_000_00
      expect(Country.new("AR").min_cross_border_payout_amount_local_cents).to eq 4_600_00
      expect(Country.new("RW").min_cross_border_payout_amount_local_cents).to eq 100_00
      expect(Country.new("TW").min_cross_border_payout_amount_local_cents).to eq 800_00
      expect(Country.new("AM").min_cross_border_payout_amount_local_cents).to eq 12_100_00
      expect(Country.new("BT").min_cross_border_payout_amount_local_cents).to eq 2_500_00
      expect(Country.new("LA").min_cross_border_payout_amount_local_cents).to eq 516_000_00
      expect(Country.new("MZ").min_cross_border_payout_amount_local_cents).to eq 1_700_00
      expect(Country.new("CL").min_cross_border_payout_amount_local_cents).to eq 23_000_00
      expect(Country.new("OM").min_cross_border_payout_amount_local_cents).to eq 1_00
      expect(Country.new("AL").min_cross_border_payout_amount_local_cents).to eq 3_000_00
      expect(Country.new("AZ").min_cross_border_payout_amount_local_cents).to eq 50_00
      expect(Country.new("PY").min_cross_border_payout_amount_local_cents).to eq 210_000_00
      expect(Country.new("GA").min_cross_border_payout_amount_local_cents).to eq 100_00
      expect(Country.new("DZ").min_cross_border_payout_amount_local_cents).to eq 1_00
    end

    it "returns 0 for unsupported or default countries" do
      expect(Country.new("US").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("GB").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("AU").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("FR").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("IL").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("TT").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("IN").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("VN").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("ID").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("CR").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("PK").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("NE").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("SM").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("BA").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("TR").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("MA").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("RS").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("ZA").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("KE").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("EG").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("CO").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("SA").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("BW").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("KZ").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("EC").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("MY").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("UY").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("MU").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("JM").min_cross_border_payout_amount_local_cents).to eq 0
      expect(Country.new("DO").min_cross_border_payout_amount_local_cents).to eq 0
    end
  end
end
