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.



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_onlyBoolean 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

Returns:

  • (Boolean)


1475
1476
1477
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1475

def accept_defective_only
  @accept_defective_only
end

#accept_exchangeBoolean 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

Returns:

  • (Boolean)


1482
1483
1484
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1482

def accept_exchange
  @accept_exchange
end

#countriesArray<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

Returns:

  • (Array<String>)


1489
1490
1491
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1489

def countries
  @countries
end

#item_conditionsArray<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

Returns:

  • (Array<String>)


1495
1496
1497
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1495

def item_conditions
  @item_conditions
end

#labelString

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

Returns:

  • (String)


1506
1507
1508
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1506

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)


1512
1513
1514
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1512

def name
  @name
end

#policyGoogle::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_daysFixnum

The field specifies the number of days it takes for merchants to process refunds, field is optional. Corresponds to the JSON property processRefundDays

Returns:

  • (Fixnum)


1523
1524
1525
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1523

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



1528
1529
1530
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1528

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


1534
1535
1536
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1534

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)


1539
1540
1541
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1539

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. It must be a valid URL. Corresponds to the JSON property returnPolicyUri

Returns:

  • (String)


1545
1546
1547
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1545

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



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