Class: GrowsurfRuby::Models::Campaign::Create

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/growsurf_ruby/models/campaign/create.rb,
sig/growsurf_ruby/models/campaign/create.rbs

Defined Under Namespace

Modules: ReferralStatus

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(email:, fingerprint: nil, first_name: nil, ip_address: nil, is_affiliate: nil, last_name: nil, metadata: nil, mobile_instance_id: nil, referral_status: nil, referred_by: nil) ⇒ Object

Some parameter documentations has been truncated, see GrowsurfRuby::Models::Campaign::Create for more details.

Parameters:

  • email (String)
  • fingerprint (String) (defaults to: nil)
  • first_name (String) (defaults to: nil)
  • ip_address (String) (defaults to: nil)
  • is_affiliate (Boolean) (defaults to: nil)

    Affiliate programs only. Controls affiliate enrollment for a new participant.

  • last_name (String) (defaults to: nil)
  • metadata (Hash{Symbol=>Object}) (defaults to: nil)

    Shallow custom metadata object.

  • mobile_instance_id (String) (defaults to: nil)

    Optional app-install scoped identifier for native mobile anti-fraud. Recommended

  • referral_status (Symbol, GrowsurfRuby::Models::Campaign::Create::ReferralStatus) (defaults to: nil)

    The referral credit status; only meaningful when referred_by resolves to a ref

  • referred_by (String) (defaults to: nil)

    Referrer participant ID or email address.



# File 'lib/growsurf_ruby/models/campaign/create.rb', line 72

Instance Attribute Details

#emailString

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/growsurf_ruby/models/campaign/create.rb', line 10

required :email, String

#fingerprintString?

Parameters:

  • (String)

Returns:

  • (String, nil)


15
# File 'lib/growsurf_ruby/models/campaign/create.rb', line 15

optional :fingerprint, String

#first_nameString?

Parameters:

  • (String)

Returns:

  • (String, nil)


20
# File 'lib/growsurf_ruby/models/campaign/create.rb', line 20

optional :first_name, String, api_name: :firstName

#ip_addressString?

Parameters:

  • (String)

Returns:

  • (String, nil)


25
# File 'lib/growsurf_ruby/models/campaign/create.rb', line 25

optional :ip_address, String, api_name: :ipAddress

#is_affiliateBoolean?

Affiliate programs only. Controls affiliate enrollment for a new participant. true enrolls the participant with affiliateStatus: APPROVED; false creates a non-affiliate without affiliateStatus. Existing participants are returned unchanged.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


34
# File 'lib/growsurf_ruby/models/campaign/create.rb', line 34

optional :is_affiliate, GrowsurfRuby::Internal::Type::Boolean, api_name: :isAffiliate

#last_nameString?

Parameters:

  • (String)

Returns:

  • (String, nil)


39
# File 'lib/growsurf_ruby/models/campaign/create.rb', line 39

optional :last_name, String, api_name: :lastName

#metadataHash{Symbol=>Object}?

Shallow custom metadata object.

Parameters:

  • (::Hash[Symbol, top])

Returns:

  • (Hash{Symbol=>Object}, nil)


45
# File 'lib/growsurf_ruby/models/campaign/create.rb', line 45

optional :metadata, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown]

#mobile_instance_idString?

Optional app-install scoped identifier for native mobile anti-fraud. Recommended for mobile participant creation and mobile participant token flows. The official mobile SDKs generate this as a lowercase UUID.

Parameters:

  • (String)

Returns:

  • (String, nil)


53
# File 'lib/growsurf_ruby/models/campaign/create.rb', line 53

optional :mobile_instance_id, String, api_name: :mobileInstanceId

#referral_statusSymbol, ...

The referral credit status; only meaningful when referred_by resolves to a referrer. When omitted it is derived from the program's referral trigger (CREDIT_AWARDED, CREDIT_PENDING, or CREDIT_EXPIRED); left unset when no referrer resolves.



62
63
64
# File 'lib/growsurf_ruby/models/campaign/create.rb', line 62

optional :referral_status,
enum: -> { GrowsurfRuby::Campaign::Create::ReferralStatus },
api_name: :referralStatus

#referred_byString?

Referrer participant ID or email address.

Parameters:

  • (String)

Returns:

  • (String, nil)


70
# File 'lib/growsurf_ruby/models/campaign/create.rb', line 70

optional :referred_by, String, api_name: :referredBy

Instance Method Details

#to_hash{

Returns:

  • ({)


72
# File 'sig/growsurf_ruby/models/campaign/create.rbs', line 72

def to_hash: -> {