Class: Google::Apis::PartnersV2::AvailableOffer

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/partners_v2/classes.rb,
generated/google/apis/partners_v2/representations.rb,
generated/google/apis/partners_v2/representations.rb

Overview

Available Offers to be distributed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AvailableOffer

Returns a new instance of AvailableOffer



220
221
222
# File 'generated/google/apis/partners_v2/classes.rb', line 220

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#availableFixnum

The number of codes for this offer that are available for distribution. Corresponds to the JSON property available

Returns:

  • (Fixnum)


161
162
163
# File 'generated/google/apis/partners_v2/classes.rb', line 161

def available
  @available
end

#country_offer_infosArray<Google::Apis::PartnersV2::CountryOfferInfo>

Offer info by country. Corresponds to the JSON property countryOfferInfos



166
167
168
# File 'generated/google/apis/partners_v2/classes.rb', line 166

def country_offer_infos
  @country_offer_infos
end

#descriptionString

Description of the offer. Corresponds to the JSON property description

Returns:

  • (String)


171
172
173
# File 'generated/google/apis/partners_v2/classes.rb', line 171

def description
  @description
end

#idFixnum

ID of this offer. Corresponds to the JSON property id

Returns:

  • (Fixnum)


176
177
178
# File 'generated/google/apis/partners_v2/classes.rb', line 176

def id
  @id
end

#max_account_ageFixnum

The maximum age of an account [in days] to be eligible. Corresponds to the JSON property maxAccountAge

Returns:

  • (Fixnum)


181
182
183
# File 'generated/google/apis/partners_v2/classes.rb', line 181

def 
  @max_account_age
end

#nameString

Name of the offer. Corresponds to the JSON property name

Returns:

  • (String)


186
187
188
# File 'generated/google/apis/partners_v2/classes.rb', line 186

def name
  @name
end

#offer_levelString

Level of this offer. Corresponds to the JSON property offerLevel

Returns:

  • (String)


191
192
193
# File 'generated/google/apis/partners_v2/classes.rb', line 191

def offer_level
  @offer_level
end

#offer_typeString

Type of offer. Corresponds to the JSON property offerType

Returns:

  • (String)


196
197
198
# File 'generated/google/apis/partners_v2/classes.rb', line 196

def offer_type
  @offer_type
end

#qualified_customerArray<Google::Apis::PartnersV2::OfferCustomer>

Customers who qualify for this offer. Corresponds to the JSON property qualifiedCustomer



201
202
203
# File 'generated/google/apis/partners_v2/classes.rb', line 201

def qualified_customer
  @qualified_customer
end

#qualified_customers_completeBoolean Also known as: qualified_customers_complete?

Whether or not the list of qualified customers is definitely complete. Corresponds to the JSON property qualifiedCustomersComplete

Returns:

  • (Boolean)


206
207
208
# File 'generated/google/apis/partners_v2/classes.rb', line 206

def qualified_customers_complete
  @qualified_customers_complete
end

#show_special_offer_copyBoolean Also known as: show_special_offer_copy?

Should special text be shown on the offers page. Corresponds to the JSON property showSpecialOfferCopy

Returns:

  • (Boolean)


212
213
214
# File 'generated/google/apis/partners_v2/classes.rb', line 212

def show_special_offer_copy
  @show_special_offer_copy
end

#termsString

Terms of the offer. Corresponds to the JSON property terms

Returns:

  • (String)


218
219
220
# File 'generated/google/apis/partners_v2/classes.rb', line 218

def terms
  @terms
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



225
226
227
228
229
230
231
232
233
234
235
236
237
238
# File 'generated/google/apis/partners_v2/classes.rb', line 225

def update!(**args)
  @available = args[:available] if args.key?(:available)
  @country_offer_infos = args[:country_offer_infos] if args.key?(:country_offer_infos)
  @description = args[:description] if args.key?(:description)
  @id = args[:id] if args.key?(:id)
  @max_account_age = args[:max_account_age] if args.key?(:max_account_age)
  @name = args[:name] if args.key?(:name)
  @offer_level = args[:offer_level] if args.key?(:offer_level)
  @offer_type = args[:offer_type] if args.key?(:offer_type)
  @qualified_customer = args[:qualified_customer] if args.key?(:qualified_customer)
  @qualified_customers_complete = args[:qualified_customers_complete] if args.key?(:qualified_customers_complete)
  @show_special_offer_copy = args[:show_special_offer_copy] if args.key?(:show_special_offer_copy)
  @terms = args[:terms] if args.key?(:terms)
end