Class: Google::Apis::AdsensehostV4_1::AssociationSession

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

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) ⇒ AssociationSession

Returns a new instance of AssociationSession.



575
576
577
# File 'generated/google/apis/adsensehost_v4_1/classes.rb', line 575

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

Instance Attribute Details

#account_idString

Hosted account id of the associated publisher after association. Present if status is ACCEPTED. Corresponds to the JSON property accountId

Returns:

  • (String)


529
530
531
# File 'generated/google/apis/adsensehost_v4_1/classes.rb', line 529

def 
  @account_id
end

#idString

Unique identifier of this association session. Corresponds to the JSON property id

Returns:

  • (String)


534
535
536
# File 'generated/google/apis/adsensehost_v4_1/classes.rb', line 534

def id
  @id
end

#kindString

Kind of resource this is, in this case adsensehost#associationSession. Corresponds to the JSON property kind

Returns:

  • (String)


539
540
541
# File 'generated/google/apis/adsensehost_v4_1/classes.rb', line 539

def kind
  @kind
end

#product_codesArray<String>

The products to associate with the user. Options: AFC, AFG, AFV, AFS ( deprecated), AFMC (deprecated) Corresponds to the JSON property productCodes

Returns:

  • (Array<String>)


545
546
547
# File 'generated/google/apis/adsensehost_v4_1/classes.rb', line 545

def product_codes
  @product_codes
end

#redirect_urlString

Redirect URL of this association session. Used to redirect users into the AdSense association flow. Corresponds to the JSON property redirectUrl

Returns:

  • (String)


551
552
553
# File 'generated/google/apis/adsensehost_v4_1/classes.rb', line 551

def redirect_url
  @redirect_url
end

#statusString

Status of the completed association, available once the association callback token has been verified. One of ACCEPTED, REJECTED, or ERROR. Corresponds to the JSON property status

Returns:

  • (String)


557
558
559
# File 'generated/google/apis/adsensehost_v4_1/classes.rb', line 557

def status
  @status
end

#user_localeString

The preferred locale of the user themselves when going through the AdSense association flow. Corresponds to the JSON property userLocale

Returns:

  • (String)


563
564
565
# File 'generated/google/apis/adsensehost_v4_1/classes.rb', line 563

def user_locale
  @user_locale
end

#website_localeString

The locale of the user's hosted website. Corresponds to the JSON property websiteLocale

Returns:

  • (String)


568
569
570
# File 'generated/google/apis/adsensehost_v4_1/classes.rb', line 568

def website_locale
  @website_locale
end

#website_urlString

The URL of the user's hosted website. Corresponds to the JSON property websiteUrl

Returns:

  • (String)


573
574
575
# File 'generated/google/apis/adsensehost_v4_1/classes.rb', line 573

def website_url
  @website_url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



580
581
582
583
584
585
586
587
588
589
590
# File 'generated/google/apis/adsensehost_v4_1/classes.rb', line 580

def update!(**args)
  @account_id = args[:account_id] if args.key?(:account_id)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @product_codes = args[:product_codes] if args.key?(:product_codes)
  @redirect_url = args[:redirect_url] if args.key?(:redirect_url)
  @status = args[:status] if args.key?(:status)
  @user_locale = args[:user_locale] if args.key?(:user_locale)
  @website_locale = args[:website_locale] if args.key?(:website_locale)
  @website_url = args[:website_url] if args.key?(:website_url)
end