class Voucherify::Service::Promotions

Attributes

client[R]

Public Class Methods

new(client) click to toggle source
# File lib/voucherify/service/promotions.rb, line 8
def initialize(client)
  @client = client
end

Public Instance Methods

create(campaign) click to toggle source
# File lib/voucherify/service/promotions.rb, line 12
def create(campaign)
  @client.campaigns.create(campaign)
end
tiers() click to toggle source
# File lib/voucherify/service/promotions.rb, line 20
def tiers
  Voucherify::Service::PromotionTiers.new(@client)
end
validate(validation_context) click to toggle source
# File lib/voucherify/service/promotions.rb, line 16
def validate(validation_context)
  @client.post('/promotions/validation', validation_context.to_json)
end