Class: Google::Apis::MerchantapiAccountsV1beta::OnlineReturnPolicy
- Inherits:
-
Object
- Object
- Google::Apis::MerchantapiAccountsV1beta::OnlineReturnPolicy
- 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
-
#accept_defective_only ⇒ Boolean
(also: #accept_defective_only?)
This field specifies if merchant only accepts defective products for returns, and this field is required.
-
#accept_exchange ⇒ Boolean
(also: #accept_exchange?)
This field specifies if merchant allows customers to exchange products, this field is required.
-
#countries ⇒ Array<String>
The countries of sale where the return policy applies.
-
#item_conditions ⇒ Array<String>
The item conditions accepted for returns must not be empty unless the type of return policy is 'noReturns'.
-
#label ⇒ String
This field represents the unique user-defined label of the return policy.
-
#name ⇒ String
Identifier.
-
#policy ⇒ Google::Apis::MerchantapiAccountsV1beta::Policy
The available policies.
-
#process_refund_days ⇒ Fixnum
The field specifies the number of days it takes for merchants to process refunds, field is optional.
-
#restocking_fee ⇒ Google::Apis::MerchantapiAccountsV1beta::RestockingFee
The restocking fee.
-
#return_methods ⇒ Array<String>
The return methods of how customers can return an item.
-
#return_policy_id ⇒ String
Output only.
-
#return_policy_uri ⇒ String
The return policy uri.
-
#return_shipping_fee ⇒ Google::Apis::MerchantapiAccountsV1beta::ReturnShippingFee
The return shipping fee.
Instance Method Summary collapse
-
#initialize(**args) ⇒ OnlineReturnPolicy
constructor
A new instance of OnlineReturnPolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ OnlineReturnPolicy
Returns a new instance of OnlineReturnPolicy.
1553 1554 1555 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1553 def initialize(**args) update!(**args) end |
Instance Attribute Details
#accept_defective_only ⇒ Boolean Also known as: accept_defective_only?
This field specifies if merchant only accepts defective products for returns,
and this field is required.
Corresponds to the JSON property acceptDefectiveOnly
1475 1476 1477 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1475 def accept_defective_only @accept_defective_only end |
#accept_exchange ⇒ Boolean Also known as: accept_exchange?
This field specifies if merchant allows customers to exchange products, this
field is required.
Corresponds to the JSON property acceptExchange
1482 1483 1484 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1482 def accept_exchange @accept_exchange end |
#countries ⇒ Array<String>
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
1489 1490 1491 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1489 def countries @countries end |
#item_conditions ⇒ Array<String>
The item conditions accepted for returns must not be empty unless the type of
return policy is 'noReturns'.
Corresponds to the JSON property itemConditions
1495 1496 1497 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1495 def item_conditions @item_conditions end |
#label ⇒ String
This field represents the unique user-defined label of the return policy. It
is important to note that the same label cannot be used in different return
policies for the same country. Unless a product specifies a specific label
attribute, policies will be automatically labeled as 'default'. 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
1506 1507 1508 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1506 def label @label end |
#name ⇒ String
Identifier. The name of the OnlineReturnPolicy
resource. Format: accounts/
account/onlineReturnPolicies/
return_policy`
Corresponds to the JSON property
name`
1512 1513 1514 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1512 def name @name end |
#policy ⇒ Google::Apis::MerchantapiAccountsV1beta::Policy
The available policies.
Corresponds to the JSON property policy
1517 1518 1519 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1517 def policy @policy end |
#process_refund_days ⇒ Fixnum
The field specifies the number of days it takes for merchants to process
refunds, field is optional.
Corresponds to the JSON property processRefundDays
1523 1524 1525 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1523 def process_refund_days @process_refund_days end |
#restocking_fee ⇒ Google::Apis::MerchantapiAccountsV1beta::RestockingFee
The restocking fee. This can be a flat fee or a micro percent.
Corresponds to the JSON property restockingFee
1528 1529 1530 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1528 def restocking_fee @restocking_fee end |
#return_methods ⇒ Array<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
1534 1535 1536 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1534 def return_methods @return_methods end |
#return_policy_id ⇒ String
Output only. Return policy ID generated by Google.
Corresponds to the JSON property returnPolicyId
1539 1540 1541 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1539 def return_policy_id @return_policy_id end |
#return_policy_uri ⇒ String
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
1545 1546 1547 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1545 def return_policy_uri @return_policy_uri end |
#return_shipping_fee ⇒ Google::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
1551 1552 1553 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1551 def return_shipping_fee @return_shipping_fee end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1558 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_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) end |