Skip to content

Commit

Permalink
Merge pull request #131 from square/release/38.0.0.20240515
Browse files Browse the repository at this point in the history
Generated PR for Release: 38.0.0.20240515
  • Loading branch information
jessemartin authored May 14, 2024
2 parents 527432c + ee1bcee commit fdc6dd9
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 14 deletions.
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-04-17'` |
| `square_version` | `String` | Square Connect API versions<br>*Default*: `'2024-05-15'` |
| `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-04-17',
square_version: '2024-05-15',
bearer_auth_credentials: BearerAuthCredentials.new(
access_token: 'AccessToken'
),
Expand Down
3 changes: 2 additions & 1 deletion doc/models/catalog-item.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ A [CatalogObject](../../doc/models/catalog-object.md) instance of the `ITEM` typ
| `description` | `String` | Optional | The item's description. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.<br><br>Deprecated at 2022-07-20, this field is planned to retire in 6 months. You should migrate to use `description_html` to set the description<br>of the [CatalogItem](entity:CatalogItem) instance. The `description` and `description_html` field values are kept in sync. If you try to<br>set the both fields, the `description_html` text value overwrites the `description` value. Updates in one field are also reflected in the other,<br>except for when you use an early version before Square API 2022-07-20 and `description_html` is set to blank, setting the `description` value to null<br>does not nullify `description_html`.<br>**Constraints**: *Maximum Length*: `4096` |
| `abbreviation` | `String` | Optional | The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used.<br>This attribute is searchable, and its value length is of Unicode code points.<br>**Constraints**: *Maximum Length*: `24` |
| `label_color` | `String` | Optional | The color of the item's display label in the Square Point of Sale app. This must be a valid hex color code. |
| `is_taxable` | `TrueClass \| FalseClass` | Optional | Indicates whether the item is taxable (`true`) or non-taxable (`false`). Default is `true`. |
| `available_online` | `TrueClass \| FalseClass` | Optional | If `true`, the item can be added to shipping orders from the merchant's online store. |
| `available_for_pickup` | `TrueClass \| FalseClass` | Optional | If `true`, the item can be added to pickup orders from the merchant's online store. |
| `available_electronically` | `TrueClass \| FalseClass` | Optional | If `true`, the item can be added to electronically fulfilled orders from the merchant's online store. |
Expand Down Expand Up @@ -44,7 +45,7 @@ A [CatalogObject](../../doc/models/catalog-object.md) instance of the `ITEM` typ
"description": "description6",
"abbreviation": "abbreviation8",
"label_color": "label_color8",
"available_online": false
"is_taxable": false
}
```

4 changes: 3 additions & 1 deletion doc/models/destination-details-card-refund-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| --- | --- | --- | --- |
| `card` | [`Card Hash`](../../doc/models/card.md) | Optional | Represents the payment details of a card to be used for payments. These<br>details are determined by the payment token generated by Web Payments SDK. |
| `entry_method` | `String` | Optional | The method used to enter the card's details for the refund. The method can be<br>`KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`.<br>**Constraints**: *Maximum Length*: `50` |
| `auth_result_code` | `String` | Optional | The authorization code provided by the issuer when a refund is approved.<br>**Constraints**: *Maximum Length*: `10` |

## Example (as JSON)

Expand All @@ -23,7 +24,8 @@
"exp_month": 228,
"exp_year": 68
},
"entry_method": "entry_method4"
"entry_method": "entry_method4",
"auth_result_code": "auth_result_code6"
}
```

3 changes: 2 additions & 1 deletion doc/models/destination-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Details about a refund's destination.
"exp_month": 228,
"exp_year": 68
},
"entry_method": "entry_method8"
"entry_method": "entry_method8",
"auth_result_code": "auth_result_code0"
}
}
```
Expand Down
3 changes: 2 additions & 1 deletion doc/models/get-payment-refund-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ present or it might be present in a FAILED state.
"exp_month": 228,
"exp_year": 68
},
"entry_method": "entry_method8"
"entry_method": "entry_method8",
"auth_result_code": "auth_result_code0"
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion doc/models/list-payment-refunds-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ Either `errors` or `refunds` is present in a given response (never both).
"exp_month": 228,
"exp_year": 68
},
"entry_method": "entry_method8"
"entry_method": "entry_method8",
"auth_result_code": "auth_result_code0"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion doc/models/payment-refund.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ the original payment and the amount of money refunded.
"exp_month": 228,
"exp_year": 68
},
"entry_method": "entry_method8"
"entry_method": "entry_method8",
"auth_result_code": "auth_result_code0"
}
},
"amount_money": {
Expand Down
1 change: 1 addition & 0 deletions doc/models/payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Represents a payment processed by the Square API.
| `receipt_url` | `String` | Optional | The URL for the payment's receipt.<br>The field is only populated for COMPLETED payments.<br>**Constraints**: *Maximum Length*: `255` |
| `device_details` | [`Device Details Hash`](../../doc/models/device-details.md) | Optional | Details about the device that took the payment. |
| `application_details` | [`Application Details Hash`](../../doc/models/application-details.md) | Optional | Details about the application that took the payment. |
| `is_offline_payment` | `TrueClass \| FalseClass` | Optional | Whether or not this payment was taken offline. |
| `version_token` | `String` | Optional | Used for optimistic concurrency. This opaque token identifies a specific version of the<br>`Payment` object. |

## Example (as JSON)
Expand Down
3 changes: 2 additions & 1 deletion doc/models/refund-payment-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ present, or it might be present with a status of `FAILED`.
"exp_month": 228,
"exp_year": 68
},
"entry_method": "entry_method8"
"entry_method": "entry_method8",
"auth_result_code": "auth_result_code0"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions lib/square.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'date'
require 'json'

require 'apimatic_core_interfaces'
require 'apimatic_core'
require 'apimatic_faraday_client_adapter'
Expand All @@ -17,6 +18,8 @@
require_relative 'square/http/http_method_enum'
require_relative 'square/http/http_request'
require_relative 'square/http/http_response'

# Logger
require_relative 'square/http/auth/o_auth2'

# Models
Expand Down
2 changes: 1 addition & 1 deletion lib/square/api/base_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class BaseApi
attr_accessor :config, :http_call_back

def self.user_agent
'Square-Ruby-SDK/37.0.0.20240417 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
'Square-Ruby-SDK/38.0.0.20240515 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
end

def self.user_agent_parameters
Expand Down
4 changes: 2 additions & 2 deletions lib/square/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Client
attr_reader :config, :auth_managers

def sdk_version
'37.0.0.20240417'
'38.0.0.20240515'
end

def square_version
Expand Down Expand Up @@ -268,7 +268,7 @@ def initialize(
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
retry_methods: %i[get put], http_callback: nil, environment: 'production',
custom_url: 'https://connect.squareup.com', access_token: nil,
bearer_auth_credentials: nil, square_version: '2024-04-17',
bearer_auth_credentials: nil, square_version: '2024-05-15',
user_agent_detail: '', additional_headers: {}, config: nil
)
@config = if config.nil?
Expand Down
2 changes: 1 addition & 1 deletion lib/square/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def initialize(
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
retry_methods: %i[get put], http_callback: nil, environment: 'production',
custom_url: 'https://connect.squareup.com', access_token: nil,
bearer_auth_credentials: nil, square_version: '2024-04-17',
bearer_auth_credentials: nil, square_version: '2024-05-15',
user_agent_detail: '', additional_headers: {}
)

Expand Down
2 changes: 1 addition & 1 deletion square.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'square.rb'
s.version = '37.0.0.20240417'
s.version = '38.0.0.20240515'
s.summary = 'square'
s.description = ''
s.authors = ['Square Developer Platform']
Expand Down

0 comments on commit fdc6dd9

Please sign in to comment.