Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Commit

Permalink
Merge pull request #29 from square/release/2.5.1
Browse files Browse the repository at this point in the history
Release 2.5.1
  • Loading branch information
jlabanca authored Nov 13, 2017
2 parents 93c7d27 + 2c88690 commit ca632a4
Show file tree
Hide file tree
Showing 21 changed files with 128 additions and 53 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## Version 2.5.1 (2017-11-10)

* `ordinal` is added to `CatalogItemVariation`
* `website_url` is added to `Location`
* `tip_money` is added to `Tender`
* Changed `object_type` and `placeholder_type` from lists to single values in `V1PageCell` to mirror data model

## Version 2.5 (2017-11-02)

### New features: Transaction API and Reporting API
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.squareup</groupId>
<artifactId>connect</artifactId>
<version>2.5.0</version>
<version>2.5.1</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -28,7 +28,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:

```groovy
compile "com.squareup:connect:2.5.0"
compile "com.squareup:connect:2.5.1"
```

### Build and Install locally
Expand All @@ -47,7 +47,7 @@ At first generate the JAR by executing:

Then manually install the following JARs:

* target/connect-2.5.0.jar
* target/connect-2.5.1.jar
* target/lib/*.jar

## Getting Started
Expand Down Expand Up @@ -406,6 +406,13 @@ Authentication schemes defined for the API:
- EMPLOYEES_WRITE: POST, PUT, and DELETE endpoints related to employee management
- TIMECARDS_READ: GET endpoints related to employee timecards
- TIMECARDS_WRITE: POST, PUT, and DELETE endpoints related to employee timecards
- PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS: Allow third party applications to deduct a portion of each transaction amount.

### oauth2ClientSecret

- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP header


## Pagination of V1 Endpoints
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'idea'
apply plugin: 'eclipse'

group = 'com.squareup'
version = '2.5.0'
version = '2.5.1'

buildscript {
repositories {
Expand Down
2 changes: 1 addition & 1 deletion docs/AdditionalRecipient.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Name | Type | Description | Notes
**locationId** | **String** | The location ID for a recipient (other than the merchant) receiving a portion of this tender. |
**description** | **String** | The description of the additional recipient. |
**amountMoney** | [**Money**](Money.md) | The amount of money distributed to the recipient. |
**receivableId** | **String** | The unique ID for this [AdditionalRecipientReceivable](#type-additionalrecipientreceivable), assigned by the server. TODO(botros): add required annotations on this, SETL-7263 | [optional]
**receivableId** | **String** | The unique ID for this [AdditionalRecipientReceivable](#type-additionalrecipientreceivable), assigned by the server. | [optional]



1 change: 1 addition & 0 deletions docs/CatalogItemVariation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**name** | **String** | The item variation&#39;s name. Searchable. | [optional]
**sku** | **String** | The item variation&#39;s SKU, if any. Searchable. | [optional]
**upc** | **String** | The item variation&#39;s UPC, if any. Searchable. | [optional]
**ordinal** | **Integer** | The order in which this item variation should be displayed. This value is read-only. On writes, the ordinal for each item variation within a parent [CatalogItem](#type-catalogitem) is set according to the item variations&#39;s position. On reads, the value is not guaranteed to be sequential or unique. | [optional]
**pricingType** | [**PricingTypeEnum**](#PricingTypeEnum) | Indicates whether the item variation&#39;s price is fixed or determined at the time of sale. See [CatalogPricingType](#type-catalogpricingtype) for all possible values. | [optional]
**priceMoney** | [**Money**](Money.md) | The item variation&#39;s price, if fixed pricing is used. | [optional]
**locationOverrides** | [**List&lt;ItemVariationLocationOverrides&gt;**](ItemVariationLocationOverrides.md) | Per-[location](#type-location) price and inventory overrides. | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/ChargeRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Name | Type | Description | Notes
**shippingAddress** | [**Address**](Address.md) | The buyer&#39;s shipping address, if available. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor &#x60;billing_address&#x60; is provided. | [optional]
**buyerEmailAddress** | **String** | The buyer&#39;s email address, if available. This value is optional, but this transaction is ineligible for chargeback protection if it is not provided. | [optional]
**orderId** | **String** | The ID of the order to associate with this transaction. If you provide this value, the &#x60;amount_money&#x60; value of your request must __exactly match__ the &#x60;total_money&#x60; value of the order&#39;s &#x60;order_amounts&#x60; field. | [optional]
**additionalRecipients** | [**List&lt;AdditionalRecipient&gt;**](AdditionalRecipient.md) | The basic primitive of multi party settlement. The value is optional. The transation facilitated by you can be splited from here. If you provide this value, the &#x60;amount_money&#x60; value in your additional_recipients must not be more than 90% of the &#x60;amount_money&#x60; value in you charge&#39;s request. The &#x60;location_id&#x60; must be the valid location of the app owner merchant. This field is currently not supported in sandbox. | [optional]
**additionalRecipients** | [**List&lt;AdditionalRecipient&gt;**](AdditionalRecipient.md) | The basic primitive of multi-party transaction. The value is optional. The transaction facilitated by you can be split from here. If you provide this value, the &#x60;amount_money&#x60; value in your additional_recipients must not be more than 90% of the &#x60;amount_money&#x60; value in you charge&#39;s request. The &#x60;location_id&#x60; must be the valid location of the app owner merchant. This field requires &#x60;PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS&#x60; OAuth permission. This field is currently not supported in sandbox. | [optional]



2 changes: 1 addition & 1 deletion docs/CreateCheckoutRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Name | Type | Description | Notes
**prePopulateBuyerEmail** | **String** | If provided, the buyer&#39;s email is pre-populated on the checkout page as an editable text field. Default: none; only exists if explicitly set. | [optional]
**prePopulateShippingAddress** | [**Address**](Address.md) | If provided, the buyer&#39;s shipping info is pre-populated on the checkout page as editable text fields. Default: none; only exists if explicitly set. | [optional]
**redirectUrl** | **String** | The URL to redirect to after checkout is completed with &#x60;checkoutId&#x60;, Square&#39;s &#x60;orderId&#x60;, &#x60;transactionId&#x60;, and &#x60;referenceId&#x60; appended as URL parameters. For example, if the provided redirect_url is &#x60;http://www.example.com/order-complete&#x60;, a successful transaction redirects the customer to: &#x60;http://www.example.com/order-complete?checkoutId&#x3D;xxxxxx&amp;orderId&#x3D;xxxxxx&amp;referenceId&#x3D;xxxxxx&amp;transactionId&#x3D;xxxxxx&#x60; If you do not provide a redirect URL, Square Checkout will display an order confirmation page on your behalf; however Square strongly recommends that you provide a redirect URL so you can verify the transaction results and finalize the order through your existing/normal confirmation workflow. Default: none; only exists if explicitly set. | [optional]
**additionalRecipients** | [**List&lt;ChargeRequestAdditionalRecipient&gt;**](ChargeRequestAdditionalRecipient.md) | The basic primitive of multi party settlement. The value is optional. The transation facilitated by you can be splited from here. If you provide this value, the &#x60;amount_money&#x60; value in your additional_recipients must not be more than 90% of the &#x60;total_money&#x60; calcualted by Square for your order. The &#x60;location_id&#x60; must be the valid location of the app owner merchant. This field is currently not supported in sandbox. | [optional]
**additionalRecipients** | [**List&lt;ChargeRequestAdditionalRecipient&gt;**](ChargeRequestAdditionalRecipient.md) | The basic primitive of multi-party transaction. The value is optional. The transaction facilitated by you can be split from here. If you provide this value, the &#x60;amount_money&#x60; value in your additional_recipients must not be more than 90% of the &#x60;total_money&#x60; calculated by Square for your order. The &#x60;location_id&#x60; must be the valid location of the app owner merchant. This field requires &#x60;PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS&#x60; OAuth permission. This field is currently not supported in sandbox. | [optional]



1 change: 1 addition & 0 deletions docs/Location.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Name | Type | Description | Notes
**phoneNumber** | **String** | The location&#39;s phone_number. | [optional]
**businessName** | **String** | The location&#39;s business_name which is shown to its customers. For example, this is the name printed on its customer&#39;s receipts. | [optional]
**type** | [**TypeEnum**](#TypeEnum) | The location&#39;s type, as set by the account owner in the Square dashboard. Typically used to indicate whether or not the location object represents a physical space like a building or mall space. See [LocationType](#type-locationtype) for possible values. | [optional]
**websiteUrl** | **String** | The location&#39;s website, as set by the account owner in the Square dashboard. Default: none; only exists if explicitly set. | [optional]


<a name="List<CapabilitiesEnum>"></a>
Expand Down
4 changes: 2 additions & 2 deletions docs/ReportingApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Method | HTTP request | Description
ListAdditionalRecipientReceivableRefunds

Lists Additional Recipient Receivable Refunds for a particular location. Max results per [page](#paginatingresults): 50
Returns a list of refunded transactions (across all possible originating locations) relating to monies credited to the provided location ID by another Square account using the &#x60;additional_recipients&#x60; field in a transaction. Max results per [page](#paginatingresults): 50

### Example
```java
Expand Down Expand Up @@ -75,7 +75,7 @@ Name | Type | Description | Notes
ListAdditionalRecipientReceivables

Lists Additional Recipient Receivables for a particular location. Max results per [page](#paginatingresults): 50
Returns a list of receivables (across all possible sending locations) representing monies credited to the provided location ID by another Square account using the &#x60;additional_recipients&#x60; field in a transaction. Max results per [page](#paginatingresults): 50

### Example
```java
Expand Down
1 change: 1 addition & 0 deletions docs/Tender.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**createdAt** | **String** | The time when the tender was created, in RFC 3339 format. | [optional]
**note** | **String** | An optional note associated with the tender at the time of payment. | [optional]
**amountMoney** | [**Money**](Money.md) | The amount of the tender. | [optional]
**tipMoney** | [**Money**](Money.md) | The tip&#39;s amount of the tender. | [optional]
**processingFeeMoney** | [**Money**](Money.md) | The amount of any Square processing fees applied to the tender. This field is not immediately populated when a new transaction is created. It is usually available after about ten seconds. | [optional]
**customerId** | **String** | If the tender is associated with a customer or represents a customer&#39;s card on file, this is the ID of the associated customer. | [optional]
**type** | [**TypeEnum**](#TypeEnum) | The type of tender, such as &#x60;CARD&#x60; or &#x60;CASH&#x60;. |
Expand Down
12 changes: 6 additions & 6 deletions docs/V1PageCell.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ Name | Type | Description | Notes
**pageId** | **String** | The unique identifier of the page the cell is included on. | [optional]
**row** | **Integer** | The row of the cell. Always an integer between 0 and 4, inclusive. | [optional]
**column** | **Integer** | The column of the cell. Always an integer between 0 and 4, inclusive. | [optional]
**objectType** | [**List&lt;ObjectTypeEnum&gt;**](#List&lt;ObjectTypeEnum&gt;) | The type of entity represented in the cell (ITEM, DISCOUNT, CATEGORY, or PLACEHOLDER). | [optional]
**objectType** | [**ObjectTypeEnum**](#ObjectTypeEnum) | The type of entity represented in the cell (ITEM, DISCOUNT, CATEGORY, or PLACEHOLDER). | [optional]
**objectId** | **String** | The unique identifier of the entity represented in the cell. Not present for cells with an object_type of PLACEHOLDER. | [optional]
**placeholderType** | [**List&lt;PlaceholderTypeEnum&gt;**](#List&lt;PlaceholderTypeEnum&gt;) | For a cell with an object_type of PLACEHOLDER, this value indicates the cell&#39;s special behavior. | [optional]
**placeholderType** | [**PlaceholderTypeEnum**](#PlaceholderTypeEnum) | For a cell with an object_type of PLACEHOLDER, this value indicates the cell&#39;s special behavior. | [optional]


<a name="List<ObjectTypeEnum>"></a>
## Enum: List&lt;ObjectTypeEnum&gt;
<a name="ObjectTypeEnum"></a>
## Enum: ObjectTypeEnum
Name | Value
---- | -----
ITEM | &quot;ITEM&quot;
Expand All @@ -22,8 +22,8 @@ CATEGORY | &quot;CATEGORY&quot;
PLACEHOLDER | &quot;PLACEHOLDER&quot;


<a name="List<PlaceholderTypeEnum>"></a>
## Enum: List&lt;PlaceholderTypeEnum&gt;
<a name="PlaceholderTypeEnum"></a>
## Enum: PlaceholderTypeEnum
Name | Value
---- | -----
ALL_ITEMS | &quot;ALL_ITEMS&quot;
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>connect</artifactId>
<packaging>jar</packaging>
<name>connect</name>
<version>2.5.0</version>
<version>2.5.1</version>
<url>https://github.com/square/connect-java-sdk/</url>
<description>Java client library for the Square Connect API</description>
<scm>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/squareup/connect/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ public ApiClient() {
this.dateFormat = new RFC3339DateFormat();

// Set default User-Agent.
setUserAgent("Square-Connect-Java/2.5.0");
setUserAgent("Square-Connect-Java/2.5.1");

// Setup authentications (key: authentication name, value: authentication).
authentications = new HashMap<String, Authentication>();
authentications.put("oauth2", new OAuth());
authentications.put("oauth2ClientSecret", new ApiKeyAuth("header", "Authorization"));
// Prevent the authentications from being modified.
authentications = Collections.unmodifiableMap(authentications);
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/squareup/connect/api/ReportingApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void setApiClient(ApiClient apiClient) {

/**
* ListAdditionalRecipientReceivableRefunds
* Lists Additional Recipient Receivable Refunds for a particular location. Max results per [page](#paginatingresults): 50
* Returns a list of refunded transactions (across all possible originating locations) relating to monies credited to the provided location ID by another Square account using the &#x60;additional_recipients&#x60; field in a transaction. Max results per [page](#paginatingresults): 50
* @param locationId The ID of the location to list AdditionalRecipientReceivableRefunds for. (required)
* @param beginTime The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year. (optional)
* @param endTime The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time. (optional)
Expand Down Expand Up @@ -90,7 +90,7 @@ public ListAdditionalRecipientReceivableRefundsResponse listAdditionalRecipientR

/**
* ListAdditionalRecipientReceivableRefunds
* Lists Additional Recipient Receivable Refunds for a particular location. Max results per [page](#paginatingresults): 50
* Returns a list of refunded transactions (across all possible originating locations) relating to monies credited to the provided location ID by another Square account using the &#x60;additional_recipients&#x60; field in a transaction. Max results per [page](#paginatingresults): 50
* @param locationId The ID of the location to list AdditionalRecipientReceivableRefunds for. (required)
* @param beginTime The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year. (optional)
* @param endTime The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time. (optional)
Expand Down Expand Up @@ -140,7 +140,7 @@ public ListAdditionalRecipientReceivableRefundsResponse listAdditionalRecipientR
}
/**
* ListAdditionalRecipientReceivables
* Lists Additional Recipient Receivables for a particular location. Max results per [page](#paginatingresults): 50
* Returns a list of receivables (across all possible sending locations) representing monies credited to the provided location ID by another Square account using the &#x60;additional_recipients&#x60; field in a transaction. Max results per [page](#paginatingresults): 50
* @param locationId The ID of the location to list AdditionalRecipientReceivables for. (required)
* @param beginTime The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year. (optional)
* @param endTime The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time. (optional)
Expand Down Expand Up @@ -192,7 +192,7 @@ public ListAdditionalRecipientReceivablesResponse listAdditionalRecipientReceiva

/**
* ListAdditionalRecipientReceivables
* Lists Additional Recipient Receivables for a particular location. Max results per [page](#paginatingresults): 50
* Returns a list of receivables (across all possible sending locations) representing monies credited to the provided location ID by another Square account using the &#x60;additional_recipients&#x60; field in a transaction. Max results per [page](#paginatingresults): 50
* @param locationId The ID of the location to list AdditionalRecipientReceivables for. (required)
* @param beginTime The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year. (optional)
* @param endTime The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time. (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ public AdditionalRecipient receivableId(String receivableId) {
}

/**
* The unique ID for this [AdditionalRecipientReceivable](#type-additionalrecipientreceivable), assigned by the server. TODO(botros): add required annotations on this, SETL-7263
* The unique ID for this [AdditionalRecipientReceivable](#type-additionalrecipientreceivable), assigned by the server.
* @return receivableId
**/
@ApiModelProperty(value = "The unique ID for this [AdditionalRecipientReceivable](#type-additionalrecipientreceivable), assigned by the server. TODO(botros): add required annotations on this, SETL-7263")
@ApiModelProperty(value = "The unique ID for this [AdditionalRecipientReceivable](#type-additionalrecipientreceivable), assigned by the server.")
public String getReceivableId() {
return receivableId;
}
Expand Down
Loading

0 comments on commit ca632a4

Please sign in to comment.