Skip to content

Commit

Permalink
Merge pull request #134 from square/release/39.0.0.20240821
Browse files Browse the repository at this point in the history
Generated PR for Release: 39.0.0.20240821
  • Loading branch information
Esawyer25 authored Aug 21, 2024
2 parents 0b28dfb + 4ecd411 commit f725068
Show file tree
Hide file tree
Showing 31 changed files with 132 additions and 83 deletions.
8 changes: 4 additions & 4 deletions doc/api/booking-custom-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,11 @@ This method returns a `\ApiResponse` instance. The `data` property in this insta
```ruby
body = {
:values => {
'key0': {
'key0' => {
:booking_id => 'booking_id4',
:key => 'key0'
},
'key1': {
'key1' => {
:booking_id => 'booking_id4',
:key => 'key0'
}
Expand Down Expand Up @@ -309,11 +309,11 @@ This method returns a `\ApiResponse` instance. The `data` property in this insta
```ruby
body = {
:values => {
'key0': {
'key0' => {
:booking_id => 'booking_id4',
:custom_attribute => {}
},
'key1': {
'key1' => {
:booking_id => 'booking_id4',
:custom_attribute => {}
}
Expand Down
8 changes: 4 additions & 4 deletions doc/api/catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ children.
IDs can be deleted. The response will only include IDs that were
actually deleted.

To ensure consistency, only one delete request is processed at a time per seller account.
To ensure consistency, only one delete request is processed at a time per seller account.
While one (batch or non-batch) delete request is being processed, other (batched and non-batched)
delete requests are rejected with the `429` error code.

Expand Down Expand Up @@ -135,7 +135,7 @@ batches will be processed in order as long as the total object count for the
request (items, variations, modifier lists, discounts, and taxes) is no more
than 10,000.

To ensure consistency, only one update request is processed at a time per seller account.
To ensure consistency, only one update request is processed at a time per seller account.
While one (batch or non-batch) update request is being processed, other (batched and non-batched)
update requests are rejected with the `429` error code.

Expand Down Expand Up @@ -449,7 +449,7 @@ end

Creates a new or updates the specified [CatalogObject](../../doc/models/catalog-object.md).

To ensure consistency, only one update request is processed at a time per seller account.
To ensure consistency, only one update request is processed at a time per seller account.
While one (batch or non-batch) update request is being processed, other (batched and non-batched)
update requests are rejected with the `429` error code.

Expand Down Expand Up @@ -527,7 +527,7 @@ are also deleted. For example, deleting a [CatalogItem](../../doc/models/catalog
will also delete all of its
[CatalogItemVariation](../../doc/models/catalog-item-variation.md) children.

To ensure consistency, only one delete request is processed at a time per seller account.
To ensure consistency, only one delete request is processed at a time per seller account.
While one (batch or non-batch) delete request is being processed, other (batched and non-batched)
delete requests are rejected with the `429` error code.

Expand Down
4 changes: 2 additions & 2 deletions doc/api/customer-custom-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,11 @@ This method returns a `\ApiResponse` instance. The `data` property in this insta
```ruby
body = {
:values => {
'key0': {
'key0' => {
:customer_id => 'customer_id8',
:custom_attribute => {}
},
'key1': {
'key1' => {
:customer_id => 'customer_id8',
:custom_attribute => {}
}
Expand Down
8 changes: 4 additions & 4 deletions doc/api/customers.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ This method returns a `\ApiResponse` instance. The `data` property in this insta
```ruby
body = {
:customers => {
'8bb76c4f-e35d-4c5b-90de-1194cd9179f0': {
'8bb76c4f-e35d-4c5b-90de-1194cd9179f0' => {
:given_name => 'Amelia',
:family_name => 'Earhart',
:email_address => '[email protected]',
Expand All @@ -179,7 +179,7 @@ body = {
:reference_id => 'YOUR_REFERENCE_ID',
:note => 'a customer'
},
'd1689f23-b25d-4932-b2f0-aed00f5e2029': {
'd1689f23-b25d-4932-b2f0-aed00f5e2029' => {
:given_name => 'Marie',
:family_name => 'Curie',
:email_address => '[email protected]',
Expand Down Expand Up @@ -320,13 +320,13 @@ This method returns a `\ApiResponse` instance. The `data` property in this insta
```ruby
body = {
:customers => {
'8DDA5NZVBZFGAX0V3HPF81HHE0': {
'8DDA5NZVBZFGAX0V3HPF81HHE0' => {
:email_address => '[email protected]',
:phone_number => 'phone_number2',
:note => 'updated customer note',
:version => 2
},
'N18CPRVXR5214XPBBA6BZQWF3C': {
'N18CPRVXR5214XPBBA6BZQWF3C' => {
:given_name => 'Marie',
:family_name => 'Curie',
:version => 0
Expand Down
3 changes: 1 addition & 2 deletions doc/api/gift-card-activities.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ end
# Create Gift Card Activity

Creates a gift card activity to manage the balance or state of a [gift card](../../doc/models/gift-card.md).
For example, you create an `ACTIVATE` activity to activate a gift card with an initial balance
before the gift card can be used.
For example, create an `ACTIVATE` activity to activate a gift card with an initial balance before first use.

```ruby
def create_gift_card_activity(body:)
Expand Down
8 changes: 5 additions & 3 deletions doc/api/gift-cards.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ end

# Create Gift Card

Creates a digital gift card or registers a physical (plastic) gift card. After the gift card
is created, you must call [CreateGiftCardActivity](../../doc/api/gift-card-activities.md#create-gift-card-activity)
to activate the card with an initial balance before it can be used for payment.
Creates a digital gift card or registers a physical (plastic) gift card. The resulting gift card
has a `PENDING` state. To activate a gift card so that it can be redeemed for purchases, call
[CreateGiftCardActivity](../../doc/api/gift-card-activities.md#create-gift-card-activity) and create an `ACTIVATE`
activity with the initial balance. Alternatively, you can use [RefundPayment](../../doc/api/refunds.md#refund-payment)
to refund a payment to the new gift card.

```ruby
def create_gift_card(body:)
Expand Down
10 changes: 5 additions & 5 deletions doc/api/location-custom-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,13 @@ This method returns a `\ApiResponse` instance. The `data` property in this insta
```ruby
body = {
:values => {
'id1': {
'id1' => {
:key => 'bestseller'
},
'id2': {
'id2' => {
:key => 'bestseller'
},
'id3': {
'id3' => {
:key => 'phone-number'
}
}
Expand Down Expand Up @@ -312,11 +312,11 @@ This method returns a `\ApiResponse` instance. The `data` property in this insta
```ruby
body = {
:values => {
'key0': {
'key0' => {
:location_id => 'location_id4',
:custom_attribute => {}
},
'key1': {
'key1' => {
:location_id => 'location_id4',
:custom_attribute => {}
}
Expand Down
8 changes: 4 additions & 4 deletions doc/api/merchant-custom-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,10 @@ This method returns a `\ApiResponse` instance. The `data` property in this insta
```ruby
body = {
:values => {
'id1': {
'id1' => {
:key => 'alternative_seller_name'
},
'id2': {
'id2' => {
:key => 'has_seen_tutorial'
}
}
Expand Down Expand Up @@ -309,11 +309,11 @@ This method returns a `\ApiResponse` instance. The `data` property in this insta
```ruby
body = {
:values => {
'key0': {
'key0' => {
:merchant_id => 'merchant_id0',
:custom_attribute => {}
},
'key1': {
'key1' => {
:merchant_id => 'merchant_id0',
:custom_attribute => {}
}
Expand Down
15 changes: 2 additions & 13 deletions doc/api/o-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,29 +148,18 @@ where `ACCESS_TOKEN` is a

If the access token is expired or not a valid access token, the endpoint returns an `UNAUTHORIZED` error.

:information_source: **Note** This endpoint does not require authentication.

```ruby
def retrieve_token_status(authorization:)
def retrieve_token_status
```

## Parameters

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `authorization` | `String` | Header, Required | Client APPLICATION_SECRET |

## Response Type

This method returns a `\ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Retrieve Token Status Response Hash`](../../doc/models/retrieve-token-status-response.md).

## Example Usage

```ruby
authorization = 'Client CLIENT_SECRET'


result = o_auth_api.retrieve_token_status(authorization: authorization)
result = o_auth_api.retrieve_token_status

if result.success?
puts result.data
Expand Down
8 changes: 4 additions & 4 deletions doc/api/order-custom-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,11 @@ This method returns a `\ApiResponse` instance. The `data` property in this insta
```ruby
body = {
:values => {
'cover-count': {
'cover-count' => {
:order_id => '7BbXGEIWNldxAzrtGf9GPVZTwZ4F',
:key => 'cover-count'
},
'table-number': {
'table-number' => {
:order_id => '7BbXGEIWNldxAzrtGf9GPVZTwZ4F',
:key => 'table-number'
}
Expand Down Expand Up @@ -329,11 +329,11 @@ This method returns a `\ApiResponse` instance. The `data` property in this insta
```ruby
body = {
:values => {
'key0': {
'key0' => {
:custom_attribute => {},
:order_id => 'order_id4'
},
'key1': {
'key1' => {
:custom_attribute => {},
:order_id => 'order_id4'
}
Expand Down
13 changes: 11 additions & 2 deletions doc/api/payments.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ def list_payments(begin_time: nil,
total: nil,
last_4: nil,
card_brand: nil,
limit: nil)
limit: nil,
is_offline_payment: false,
offline_begin_time: nil,
offline_end_time: nil)
```

## Parameters
Expand All @@ -53,6 +56,9 @@ def list_payments(begin_time: nil,
| `last_4` | `String` | Query, Optional | The last four digits of a payment card. |
| `card_brand` | `String` | Query, Optional | The brand of the payment card (for example, VISA). |
| `limit` | `Integer` | Query, Optional | The maximum number of results to be returned in a single page.<br>It is possible to receive fewer results than the specified limit on a given page.<br><br>The default value of 100 is also the maximum allowed value. If the provided value is<br>greater than 100, it is ignored and the default value is used instead.<br><br>Default: `100` |
| `is_offline_payment` | `TrueClass \| FalseClass` | Query, Optional | Whether the payment was taken offline or not. |
| `offline_begin_time` | `String` | Query, Optional | Indicates the start of the time range for which to retrieve offline payments, in RFC 3339<br>format for timestamps. The range is determined using the<br>`offline_payment_details.client_created_at` field for each Payment. If set, payments without a<br>value set in `offline_payment_details.client_created_at` will not be returned.<br><br>Default: The current time. |
| `offline_end_time` | `String` | Query, Optional | Indicates the end of the time range for which to retrieve offline payments, in RFC 3339<br>format for timestamps. The range is determined using the<br>`offline_payment_details.client_created_at` field for each Payment. If set, payments without a<br>value set in `offline_payment_details.client_created_at` will not be returned.<br><br>Default: The current time. |

## Response Type

Expand All @@ -61,7 +67,10 @@ This method returns a `\ApiResponse` instance. The `data` property in this insta
## Example Usage

```ruby
result = payments_api.list_payments
is_offline_payment = false


result = payments_api.list_payments(is_offline_payment: is_offline_payment)

if result.success?
puts result.data
Expand Down
8 changes: 4 additions & 4 deletions doc/api/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ This method returns a `\ApiResponse` instance. The `data` property in this insta
```ruby
body = {
:team_members => {
'idempotency-key-1': {
'idempotency-key-1' => {
:team_member => {
:reference_id => 'reference_id_1',
:given_name => 'Joe',
Expand All @@ -121,7 +121,7 @@ body = {
}
}
},
'idempotency-key-2': {
'idempotency-key-2' => {
:team_member => {
:reference_id => 'reference_id_2',
:given_name => 'Jane',
Expand Down Expand Up @@ -174,7 +174,7 @@ This method returns a `\ApiResponse` instance. The `data` property in this insta
```ruby
body = {
:team_members => {
'AFMwA08kR-MIF-3Vs0OE': {
'AFMwA08kR-MIF-3Vs0OE' => {
:team_member => {
:reference_id => 'reference_id_2',
:is_owner => false,
Expand All @@ -188,7 +188,7 @@ body = {
}
}
},
'fpgteZNMaf0qOK-a4t6P': {
'fpgteZNMaf0qOK-a4t6P' => {
:team_member => {
:reference_id => 'reference_id_1',
:is_owner => false,
Expand Down
8 changes: 4 additions & 4 deletions doc/api/vendors.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ This method returns a `\ApiResponse` instance. The `data` property in this insta
```ruby
body = {
:vendors => {
'key0': {},
'key1': {}
'key0' => {},
'key1' => {}
}
}

Expand Down Expand Up @@ -119,10 +119,10 @@ This method returns a `\ApiResponse` instance. The `data` property in this insta
```ruby
body = {
:vendors => {
'key0': {
'key0' => {
:vendor => {}
},
'key1': {
'key1' => {
:vendor => {}
}
}
Expand Down
4 changes: 2 additions & 2 deletions doc/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The following parameters are configurable for the API Client:

| Parameter | Type | Description |
| --- | --- | --- |
| `square_version` | `String` | Square Connect API versions<br>*Default*: `'2024-07-17'` |
| `square_version` | `String` | Square Connect API versions<br>*Default*: `'2024-08-21'` |
| `custom_url` | `String` | Sets the base URL requests are made to. Defaults to `https://connect.squareup.com`<br>*Default*: `'https://connect.squareup.com'` |
| `environment` | `string` | The API environment. <br> **Default: `production`** |
| `connection` | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
Expand All @@ -25,7 +25,7 @@ The API client can be initialized as follows:

```ruby
client = Square::Client.new(
square_version: '2024-07-17',
square_version: '2024-08-21',
bearer_auth_credentials: BearerAuthCredentials.new(
access_token: 'AccessToken'
),
Expand Down
1 change: 1 addition & 0 deletions doc/models/create-payment-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Describes a request to create a payment using
| `cash_details` | [`Cash Payment Details Hash`](../../doc/models/cash-payment-details.md) | Optional | Stores details about a cash payment. Contains only non-confidential information. For more information, see<br>[Take Cash Payments](https://developer.squareup.com/docs/payments-api/take-payments/cash-payments). |
| `external_details` | [`External Payment Details Hash`](../../doc/models/external-payment-details.md) | Optional | Stores details about an external payment. Contains only non-confidential information.<br>For more information, see<br>[Take External Payments](https://developer.squareup.com/docs/payments-api/take-payments/external-payments). |
| `customer_details` | [`Customer Details Hash`](../../doc/models/customer-details.md) | Optional | Details about the customer making the payment. |
| `offline_payment_details` | [`Offline Payment Details Hash`](../../doc/models/offline-payment-details.md) | Optional | Details specific to offline payments. |

## Example (as JSON)

Expand Down
2 changes: 1 addition & 1 deletion doc/models/gift-card-activity-activate.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Represents details about an `ACTIVATE` [gift card activity type](../../doc/model
| `order_id` | `String` | Optional | The ID of the [order](entity:Order) that contains the `GIFT_CARD` line item.<br><br>Applications that use the Square Orders API to process orders must specify the order ID<br>[CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request. |
| `line_item_uid` | `String` | Optional | The UID of the `GIFT_CARD` line item in the order that represents the gift card purchase.<br><br>Applications that use the Square Orders API to process orders must specify the line item UID<br>in the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request. |
| `reference_id` | `String` | Optional | A client-specified ID that associates the gift card activity with an entity in another system.<br><br>Applications that use a custom order processing system can use this field to track information<br>related to an order or payment. |
| `buyer_payment_instrument_ids` | `Array<String>` | Optional | The payment instrument IDs used to process the gift card purchase, such as a credit card ID<br>or bank account ID.<br><br>Applications that use a custom order processing system must specify payment instrument IDs in<br>the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.<br>Square uses this information to perform compliance checks.<br><br>For applications that use the Square Orders API to process payments, Square has the necessary<br>instrument IDs to perform compliance checks. |
| `buyer_payment_instrument_ids` | `Array<String>` | Optional | The payment instrument IDs used to process the gift card purchase, such as a credit card ID<br>or bank account ID.<br><br>Applications that use a custom order processing system must specify payment instrument IDs in<br>the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.<br>Square uses this information to perform compliance checks.<br><br>For applications that use the Square Orders API to process payments, Square has the necessary<br>instrument IDs to perform compliance checks.<br><br>Each buyer payment instrument ID can contain a maximum of 255 characters. |

## Example (as JSON)

Expand Down
2 changes: 1 addition & 1 deletion doc/models/gift-card-activity-load.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Represents details about a `LOAD` [gift card activity type](../../doc/models/gif
| `order_id` | `String` | Optional | The ID of the [order](entity:Order) that contains the `GIFT_CARD` line item.<br><br>Applications that use the Square Orders API to process orders must specify the order ID in the<br>[CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request. |
| `line_item_uid` | `String` | Optional | The UID of the `GIFT_CARD` line item in the order that represents the additional funds for the gift card.<br><br>Applications that use the Square Orders API to process orders must specify the line item UID<br>in the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request. |
| `reference_id` | `String` | Optional | A client-specified ID that associates the gift card activity with an entity in another system.<br><br>Applications that use a custom order processing system can use this field to track information related to<br>an order or payment. |
| `buyer_payment_instrument_ids` | `Array<String>` | Optional | The payment instrument IDs used to process the order for the additional funds, such as a credit card ID<br>or bank account ID.<br><br>Applications that use a custom order processing system must specify payment instrument IDs in<br>the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.<br>Square uses this information to perform compliance checks.<br><br>For applications that use the Square Orders API to process payments, Square has the necessary<br>instrument IDs to perform compliance checks. |
| `buyer_payment_instrument_ids` | `Array<String>` | Optional | The payment instrument IDs used to process the order for the additional funds, such as a credit card ID<br>or bank account ID.<br><br>Applications that use a custom order processing system must specify payment instrument IDs in<br>the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.<br>Square uses this information to perform compliance checks.<br><br>For applications that use the Square Orders API to process payments, Square has the necessary<br>instrument IDs to perform compliance checks.<br><br>Each buyer payment instrument ID can contain a maximum of 255 characters. |

## Example (as JSON)

Expand Down
Loading

0 comments on commit f725068

Please sign in to comment.