Class: Google::Apis::MerchantapiAccountsV1beta::OnlineReturnPolicy

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

Online return policy 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) ⇒ OnlineReturnPolicy

Returns a new instance of OnlineReturnPolicy.



2858
2859
2860
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2858

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

Instance Attribute Details

#accept_defective_onlyBoolean Also known as: accept_defective_only?

Optional. This field specifies if business only accepts defective products for returns. Corresponds to the JSON property acceptDefectiveOnly

Returns:

  • (Boolean)


2768
2769
2770
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2768

def accept_defective_only
  @accept_defective_only
end

#accept_exchangeBoolean Also known as: accept_exchange?

Optional. This field specifies if business allows customers to exchange products. Corresponds to the JSON property acceptExchange

Returns:

  • (Boolean)


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

def accept_exchange
  @accept_exchange
end

#countriesArray<String>

Required. Immutable. The countries of sale where the return policy applies. The values must be a valid 2 letter ISO 3166 code. Corresponds to the JSON property countries

Returns:

  • (Array<String>)


2782
2783
2784
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2782

def countries
  @countries
end

#item_conditionsArray<String>

Optional. The item conditions accepted for returns must not be empty unless the type of return policy is 'noReturns'. Corresponds to the JSON property itemConditions

Returns:

  • (Array<String>)


2788
2789
2790
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2788

def item_conditions
  @item_conditions
end

#labelString

Optional. Immutable. This field represents the unique user-defined label of the return policy for the given country. It is important to note that the same label cannot be used in different return policies for the same country. If not given, policies will be automatically treated as the 'default' for the country. When using label, you are creating an exception policy in that country to assign a custom return policy to certain product groups, follow the instructions provided in the Return policy label. The label can contain up to 50 characters. Corresponds to the JSON property label

Returns:

  • (String)


2800
2801
2802
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2800

def label
  @label
end

#nameString

Identifier. The name of the OnlineReturnPolicy resource. Format: accounts/ account/onlineReturnPolicies/return_policy` Corresponds to the JSON propertyname`

Returns:

  • (String)


2806
2807
2808
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2806

def name
  @name
end

#policyGoogle::Apis::MerchantapiAccountsV1beta::Policy

The available policies. Corresponds to the JSON property policy



2811
2812
2813
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2811

def policy
  @policy
end

#process_refund_daysFixnum

Optional. The field specifies the number of days it takes for business to process refunds. Corresponds to the JSON property processRefundDays

Returns:

  • (Fixnum)


2817
2818
2819
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2817

def process_refund_days
  @process_refund_days
end

#restocking_feeGoogle::Apis::MerchantapiAccountsV1beta::RestockingFee

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



2822
2823
2824
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2822

def restocking_fee
  @restocking_fee
end

#return_label_sourceString

Optional. The field specifies the return label source. Corresponds to the JSON property returnLabelSource

Returns:

  • (String)


2827
2828
2829
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2827

def return_label_source
  @return_label_source
end

#return_methodsArray<String>

Optional. 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>)


2833
2834
2835
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2833

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)


2838
2839
2840
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2838

def return_policy_id
  @return_policy_id
end

#return_policy_uriString

Required. The return policy uri. This can used by Google to do a sanity check for the policy. It must be a valid URL. Corresponds to the JSON property returnPolicyUri

Returns:

  • (String)


2844
2845
2846
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2844

def return_policy_uri
  @return_policy_uri
end

#return_shipping_feeGoogle::Apis::MerchantapiAccountsV1beta::ReturnShippingFee

The return shipping fee. This can either be a fixed fee or a boolean to indicate that the customer pays the actual shipping cost. Corresponds to the JSON property returnShippingFee



2850
2851
2852
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2850

def return_shipping_fee
  @return_shipping_fee
end

#seasonal_overridesArray<Google::Apis::MerchantapiAccountsV1beta::SeasonalOverride>

Optional. Overrides to the general policy for orders placed during a specific set of time intervals. Corresponds to the JSON property seasonalOverrides



2856
2857
2858
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2856

def seasonal_overrides
  @seasonal_overrides
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2863

def update!(**args)
  @accept_defective_only = args[:accept_defective_only] if args.key?(:accept_defective_only)
  @accept_exchange = args[:accept_exchange] if args.key?(:accept_exchange)
  @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)
  @process_refund_days = args[:process_refund_days] if args.key?(:process_refund_days)
  @restocking_fee = args[:restocking_fee] if args.key?(:restocking_fee)
  @return_label_source = args[:return_label_source] if args.key?(:return_label_source)
  @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_shipping_fee = args[:return_shipping_fee] if args.key?(:return_shipping_fee)
  @seasonal_overrides = args[:seasonal_overrides] if args.key?(:seasonal_overrides)
end