class Urbanairship::AbTests::Variant
Attributes
description[RW]
id[RW]
name[RW]
push[RW]
schedule[RW]
weight[RW]
Public Class Methods
new(client: required('client'))
click to toggle source
# File lib/urbanairship/ab_tests/variant.rb, line 15 def initialize(client: required('client')) @client = client end
Public Instance Methods
payload()
click to toggle source
# File lib/urbanairship/ab_tests/variant.rb, line 19 def payload fail ArgumentError, 'a push must be added to create a variant' if @push.nil? { 'description': description, 'id': id, 'name': name, 'push': push, 'schedule': schedule, 'weight': weight }.delete_if {|key, value| value.nil?} #this removes the nil key value pairs end