Skip to content

Commit d7de2bc

Browse files
committed
release
1 parent c14a136 commit d7de2bc

34 files changed

+343
-62
lines changed

Rakefile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
lib = File.expand_path('../lib', __FILE__)
2-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3-
4-
require "bundler/gem_tasks"
5-
require 'rake/testtask'
6-
7-
Rake::TestTask.new(:test) do |t|
8-
t.libs << "test"
9-
t.test_files = FileList['test/**/test_*.rb', 'spec/**/*_spec.rb']
10-
t.warning = false
11-
end
12-
13-
task :default => :test
1+
lib = File.expand_path('../lib', __FILE__)
2+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3+
4+
require "bundler/gem_tasks"
5+
require 'rake/testtask'
6+
7+
Rake::TestTask.new(:test) do |t|
8+
t.libs << "test"
9+
t.test_files = FileList['test/**/test_*.rb', 'spec/**/*_spec.rb']
10+
t.warning = false
11+
end
12+
13+
task :default => :test

doc/catalog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ Returns a list of [CatalogObject](#type-catalogobject)s that includes
234234
all objects of a set of desired types (for example, all [CatalogItem](#type-catalogitem)
235235
and [CatalogTax](#type-catalogtax) objects) in the catalog. The `types` parameter
236236
is specified as a comma-separated list of valid [CatalogObject](#type-catalogobject) types:
237-
`ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`.
237+
`ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`, `IMAGE`.
238238

239239
__Important:__ ListCatalog does not return deleted catalog items. To retrieve
240240
deleted catalog items, use SearchCatalogObjects and set `include_deleted_objects`

doc/merchants.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,48 @@ merchants_api = client.merchants
88

99
`MerchantsApi`
1010

11+
## Methods
12+
13+
* [List Merchants](/doc/merchants.md#list-merchants)
14+
* [Retrieve Merchant](/doc/merchants.md#retrieve-merchant)
15+
16+
## List Merchants
17+
18+
Returns `Merchant` information for a given access token.
19+
20+
If you don't know a `Merchant` ID, you can use this endpoint to retrieve the merchant ID for an access token.
21+
You can specify your personal access token to get your own merchant information or specify an OAuth token
22+
to get the information for the merchant that granted you access.
23+
24+
If you know the merchant ID, you can also use the [RetrieveMerchant](#endpoint-merchants-retrievemerchant)
25+
endpoint to get the merchant information.
26+
27+
```ruby
28+
def list_merchants(cursor: nil)
29+
```
30+
31+
### Parameters
32+
33+
| Parameter | Type | Tags | Description |
34+
| --- | --- | --- | --- |
35+
| `cursor` | `Integer` | Query, Optional | The cursor generated by the previous response. |
36+
37+
### Response Type
38+
39+
[`List Merchants Response Hash`](/doc/models/list-merchants-response.md)
40+
41+
### Example Usage
42+
43+
```ruby
44+
result = merchants_api.list_merchants()
45+
46+
if result.success?
47+
puts result.data
48+
elsif result.error?
49+
warn result.errors
50+
end
51+
```
52+
1153
## Retrieve Merchant
1254

1355
Retrieve a `Merchant` object for the given `merchant_id`.
@@ -20,7 +62,7 @@ def retrieve_merchant(merchant_id:)
2062

2163
| Parameter | Type | Tags | Description |
2264
| --- | --- | --- | --- |
23-
| `merchant_id` | `String` | Template, Required | The ID of the merchant to retrieve |
65+
| `merchant_id` | `String` | Template, Required | The ID of the merchant to retrieve. |
2466

2567
### Response Type
2668

doc/models/catalog-item-option-value.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ its item option values.
1515
| `item_option_id` | `String` | Optional | Unique ID of the associated item option. |
1616
| `name` | `String` | Optional | Name of this item option value. Searchable. |
1717
| `description` | `String` | Optional | The option value's human-readable description. |
18-
| `color` | `String` | Optional | The HTML color for this value in the format #FFRRGGBB or #RRGGBB<br>(e.g., "#ff8d4e85"). Only displayed if parent Item Option's `show_colors`<br>flag is enabled.<br>value. |
18+
| `color` | `String` | Optional | The HTML-supported hex color for the item option<br>(e.g., "#ff8d4e85"). Only displayed if `show_colors` is enabled on the<br>parent `ItemOption`. When left unset, `color` defaults to white ("#ffffff")<br>when `show_colors` is enabled on the parent `ItemOption`. |
1919
| `ordinal` | `Integer` | Optional | Determines where this option value appears in a list of option values. |
2020
| `item_variation_count` | `Long` | Optional | The number of [CatalogItemVariation(#type-catalogitemvariation)s that<br>currently make use of this Item Option value. Present only if `retrieve_counts`<br>was specified on the request used to retrieve the parent Item Option of this<br>value.<br><br>Maximum: 100 counts. |
2121

doc/models/catalog-pricing-rule.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ during the active time period.
1515
| `time_period_ids` | `Array<String>` | Optional | Unique ID for the [CatalogTimePeriod](#type-catalogtimeperiod)s when<br>this pricing rule is in effect. If left unset, the pricing rule is always<br>in effect. |
1616
| `discount_id` | `String` | Optional | Unique ID for the [CatalogDiscount](#type-catalogdiscount) to take off<br>the price of all matched items. |
1717
| `match_products_id` | `String` | Optional | Unique ID for the [CatalogProductSet](#type-catalogproductset) that will<br>be matched by this rule. A match rule matches within the entire cart. |
18-
| `apply_products_id` | `String` | Optional | The [CatalogProductSet](#type-catalogproductset) to apply the pricing rule to<br>within the set of matched products specified by `match_products_id`.<br>An apply rule can only match once within the set of matched products.<br>If left unset, the pricing rule will be applied to all products within the<br>set of matched products. |
18+
| `apply_products_id` | `String` | Optional | [CatalogProductSet](#type-catalogproductset) to apply the pricing to.<br>An apply rule matches within the subset of the cart that fits the match rules (the match set).<br>An apply rule can only match once in the match set.<br>If not supplied, the pricing will be applied to all products in the match set.<br>Other products retain their base price, or a price generated by other rules.<br>This field has been deprecated: new pricing rules should prefer the exclude_products_id<br>field. Exclude sets allow better control over quantity ranges and offer more flexibility<br>for which matched items receive a discount. |
1919
| `exclude_products_id` | `String` | Optional | Identifies the [CatalogProductSet](#type-catalogproductset) to exclude<br>from this pricing rule.<br>An exclude rule matches within the subset of the cart that fits the match rules (the match set).<br>An exclude rule can only match once in the match set.<br>If not supplied, the pricing will be applied to all products in the match set.<br>Other products retain their base price, or a price generated by other rules. |
2020
| `valid_from_date` | `String` | Optional | Represents the date the Pricing Rule is valid from. Represented in<br>RFC3339 full-date format (YYYY-MM-DD). |
2121
| `valid_from_local_time` | `String` | Optional | Represents the local time the pricing rule should be valid from. Time<br>zone is determined by the device running the Point of Sale app.<br><br>Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated. |
2222
| `valid_until_date` | `String` | Optional | Represents the date the pricing rule will become inactive.<br><br>Represented in RFC3339 full-date format (YYYY-MM-DD). |
2323
| `valid_until_local_time` | `String` | Optional | Represents the local time at which the pricing rule will become inactive.<br>Time zone is determined by the device running the Point of Sale app.<br><br>Represented in RFC3339 partial-time format<br>(HH:MM:SS). Partial seconds will be truncated. |
24+
| `exclude_strategy` | [`String (Exclude Strategy)`](/doc/models/exclude-strategy.md) | Optional | Indicates which products matched by a [CatalogPricingRule](#type-catalogpricingrule)<br>will be excluded if the pricing rule uses an exclude set. |
2425

2526
### Example (as JSON)
2627

@@ -35,7 +36,8 @@ during the active time period.
3536
"valid_from_date": null,
3637
"valid_from_local_time": null,
3738
"valid_until_date": null,
38-
"valid_until_local_time": null
39+
"valid_until_local_time": null,
40+
"exclude_strategy": null
3941
}
4042
```
4143

doc/models/customer-filter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Customer Filter
22

3-
Represents a set of [`CustomerQuery`](#type-customerquery) filters used
4-
to limit the set of Customers returned by [`SearchCustomers`](#endpoint-customers-seachcustomers).
3+
Represents a set of `CustomerQuery` filters used
4+
to limit the set of Customers returned by SearchCustomers.
55

66
### Structure
77

doc/models/customer-query.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ for customer profiles.
1111

1212
| Name | Type | Tags | Description |
1313
| --- | --- | --- | --- |
14-
| `filter` | [`Customer Filter Hash`](/doc/models/customer-filter.md) | Optional | Represents a set of [`CustomerQuery`](#type-customerquery) filters used<br>to limit the set of Customers returned by [`SearchCustomers`](#endpoint-customers-seachcustomers). |
15-
| `sort` | [`Customer Sort Hash`](/doc/models/customer-sort.md) | Optional | Indicates the field to use for sorting customer profiles. For example,<br>by total money spent with the merchant or the date of their first purchase. |
14+
| `filter` | [`Customer Filter Hash`](/doc/models/customer-filter.md) | Optional | Represents a set of `CustomerQuery` filters used<br>to limit the set of Customers returned by SearchCustomers. |
15+
| `sort` | [`Customer Sort Hash`](/doc/models/customer-sort.md) | Optional | Indicates the field to use for sorting customer profiles. |
1616

1717
### Example (as JSON)
1818

doc/models/customer-sort.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
## Customer Sort
22

3-
Indicates the field to use for sorting customer profiles. For example,
4-
by total money spent with the merchant or the date of their first purchase.
3+
Indicates the field to use for sorting customer profiles.
54

65
### Structure
76

doc/models/exclude-strategy.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Exclude Strategy
2+
3+
Indicates which products matched by a [CatalogPricingRule](#type-catalogpricingrule)
4+
will be excluded if the pricing rule uses an exclude set.
5+
6+
### Enumeration
7+
8+
`ExcludeStrategy`
9+
10+
### Fields
11+
12+
| Name | Description |
13+
| --- | --- |
14+
| `LEAST_EXPENSIVE` | The least expensive matched products are excluded from the pricing. If<br>the pricing rule is set to exclude one product and multiple products in the<br>match set qualify as least expensive, then one will be excluded at random.<br><br>Excluding the least expensive product gives the best discount value to the buyer. |
15+
| `MOST_EXPENSIVE` | The most expensive matched product is excluded from the pricing rule.<br>If multiple products have the same price and all qualify as least expensive,<br>one will be excluded at random.<br><br>This guarantees that the most expensive product is purchased at full price. |
16+

doc/models/list-merchants-request.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## List Merchants Request
2+
3+
Request object for the [ListMerchant](#endpoint-listmerchant) endpoint.
4+
5+
### Structure
6+
7+
`ListMerchantsRequest`
8+
9+
### Fields
10+
11+
| Name | Type | Tags | Description |
12+
| --- | --- | --- | --- |
13+
| `cursor` | `Integer` | Optional | The cursor generated by the previous response. |
14+
15+
### Example (as JSON)
16+
17+
```json
18+
{
19+
"cursor": null
20+
}
21+
```
22+

0 commit comments

Comments
 (0)