Class: Google::Apis::MerchantapiAccountsV1beta::TermsOfServiceAgreementState

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

Overview

This resource represents the agreement state for a given account and terms of service kind. The state is as follows: * If the merchant has accepted a terms of service: accepted will be populated, otherwise it will be empty * If the merchant must sign a terms of service: required will be populated, otherwise it will be empty. Note that both required and accepted can be present. In this case the accepted terms of services will have an expiration date set in the valid_until field. The required terms of services need to be accepted before valid_until in order for the account to continue having a valid agreement. When accepting new terms of services we expect 3Ps to display the text associated with the given terms of service agreement (the url to the file containing the text is added in the Required message below as tos_file_uri. The actual acceptance of the terms of service is done by calling accept on the TermsOfService resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TermsOfServiceAgreementState

Returns a new instance of TermsOfServiceAgreementState.



2766
2767
2768
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2766

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

Instance Attribute Details

#acceptedGoogle::Apis::MerchantapiAccountsV1beta::Accepted

Describes the accepted terms of service. Corresponds to the JSON property accepted



2742
2743
2744
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2742

def accepted
  @accepted
end

#nameString

Identifier. The resource name of the terms of service version. Format: accounts/account/termsOfServiceAgreementState/identifier` Corresponds to the JSON propertyname`

Returns:

  • (String)


2748
2749
2750
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2748

def name
  @name
end

#region_codeString

Region code as defined by https://cldr.unicode.org/. This is the country the current state applies to. Corresponds to the JSON property regionCode

Returns:

  • (String)


2754
2755
2756
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2754

def region_code
  @region_code
end

#requiredGoogle::Apis::MerchantapiAccountsV1beta::Required

Describes the terms of service which are required to be accepted. Corresponds to the JSON property required



2759
2760
2761
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2759

def required
  @required
end

#terms_of_service_kindString

Terms of Service kind associated with the particular version. Corresponds to the JSON property termsOfServiceKind

Returns:

  • (String)


2764
2765
2766
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2764

def terms_of_service_kind
  @terms_of_service_kind
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2771
2772
2773
2774
2775
2776
2777
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2771

def update!(**args)
  @accepted = args[:accepted] if args.key?(:accepted)
  @name = args[:name] if args.key?(:name)
  @region_code = args[:region_code] if args.key?(:region_code)
  @required = args[:required] if args.key?(:required)
  @terms_of_service_kind = args[:terms_of_service_kind] if args.key?(:terms_of_service_kind)
end