Class: Google::Apis::ContentV2_1::ReturnPolicyOnline

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

Overview

Return policy online object. This is currently used to represent return policies for ads and free listings programs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ReturnPolicyOnline

Returns a new instance of ReturnPolicyOnline.



12532
12533
12534
# File 'lib/google/apis/content_v2_1/classes.rb', line 12532

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

Instance Attribute Details

#countriesArray<String>

The countries of sale where the return policy is applicable. The values must be a valid 2 letter ISO 3166 code, e.g. "US". Corresponds to the JSON property countries

Returns:

  • (Array<String>)


12478
12479
12480
# File 'lib/google/apis/content_v2_1/classes.rb', line 12478

def countries
  @countries
end

#item_conditionsArray<String>

The item conditions that are accepted for returns. This is required to not be empty unless the type of return policy is noReturns. Corresponds to the JSON property itemConditions

Returns:

  • (Array<String>)


12484
12485
12486
# File 'lib/google/apis/content_v2_1/classes.rb', line 12484

def item_conditions
  @item_conditions
end

#labelString

The unique user-defined label of the return policy. The same label cannot be used in different return policies for the same country. Policies with the label 'default' will apply to all products, unless a product specifies a return_policy_label attribute. Corresponds to the JSON property label

Returns:

  • (String)


12492
12493
12494
# File 'lib/google/apis/content_v2_1/classes.rb', line 12492

def label
  @label
end

#nameString

The name of the policy as shown in Merchant Center. Corresponds to the JSON property name

Returns:

  • (String)


12497
12498
12499
# File 'lib/google/apis/content_v2_1/classes.rb', line 12497

def name
  @name
end

#policyGoogle::Apis::ContentV2_1::ReturnPolicyOnlinePolicy

The available policies. Corresponds to the JSON property policy



12502
12503
12504
# File 'lib/google/apis/content_v2_1/classes.rb', line 12502

def policy
  @policy
end

#restocking_feeGoogle::Apis::ContentV2_1::ReturnPolicyOnlineRestockingFee

The restocking fee. This can either be a fixed fee or a micro percent. Corresponds to the JSON property restockingFee



12507
12508
12509
# File 'lib/google/apis/content_v2_1/classes.rb', line 12507

def restocking_fee
  @restocking_fee
end

#return_methodsArray<String>

The return methods of how customers can return an item. This value is required to not be empty unless the type of return policy is noReturns. Corresponds to the JSON property returnMethods

Returns:

  • (Array<String>)


12513
12514
12515
# File 'lib/google/apis/content_v2_1/classes.rb', line 12513

def return_methods
  @return_methods
end

#return_policy_idString

Output only. Return policy ID generated by Google. Corresponds to the JSON property returnPolicyId

Returns:

  • (String)


12518
12519
12520
# File 'lib/google/apis/content_v2_1/classes.rb', line 12518

def return_policy_id
  @return_policy_id
end

#return_policy_uriString

The return policy uri. This can used by Google to do a sanity check for the policy. Corresponds to the JSON property returnPolicyUri

Returns:

  • (String)


12524
12525
12526
# File 'lib/google/apis/content_v2_1/classes.rb', line 12524

def return_policy_uri
  @return_policy_uri
end

#return_reason_category_infoArray<Google::Apis::ContentV2_1::ReturnPolicyOnlineReturnReasonCategoryInfo>

The return reason category information. This required to not be empty unless the type of return policy is noReturns. Corresponds to the JSON property returnReasonCategoryInfo



12530
12531
12532
# File 'lib/google/apis/content_v2_1/classes.rb', line 12530

def return_reason_category_info
  @return_reason_category_info
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
# File 'lib/google/apis/content_v2_1/classes.rb', line 12537

def update!(**args)
  @countries = args[:countries] if args.key?(:countries)
  @item_conditions = args[:item_conditions] if args.key?(:item_conditions)
  @label = args[:label] if args.key?(:label)
  @name = args[:name] if args.key?(:name)
  @policy = args[:policy] if args.key?(:policy)
  @restocking_fee = args[:restocking_fee] if args.key?(:restocking_fee)
  @return_methods = args[:return_methods] if args.key?(:return_methods)
  @return_policy_id = args[:return_policy_id] if args.key?(:return_policy_id)
  @return_policy_uri = args[:return_policy_uri] if args.key?(:return_policy_uri)
  @return_reason_category_info = args[:return_reason_category_info] if args.key?(:return_reason_category_info)
end