square_connect 2.20190612.0.311 → 2.20190612.1.314
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/README.md +4 -3
- data/docs/CatalogObject.md +1 -1
- data/docs/ChargeRequest.md +1 -0
- data/docs/CreateCustomerCardRequest.md +3 -2
- data/docs/CustomersApi.md +2 -2
- data/docs/OAuthApi.md +1 -1
- data/docs/OrderLineItem.md +1 -1
- data/docs/OrderQuantityUnit.md +1 -1
- data/docs/V1CashDrawerShift.md +2 -2
- data/docs/V1Item.md +1 -1
- data/docs/WebhookEvents.md +12 -0
- data/lib/square_connect.rb +1 -0
- data/lib/square_connect/api/customers_api.rb +2 -2
- data/lib/square_connect/api/o_auth_api.rb +2 -2
- data/lib/square_connect/api_client.rb +1 -1
- data/lib/square_connect/models/catalog_object.rb +1 -1
- data/lib/square_connect/models/charge_request.rb +14 -4
- data/lib/square_connect/models/create_customer_card_request.rb +16 -6
- data/lib/square_connect/models/order_line_item.rb +1 -1
- data/lib/square_connect/models/order_quantity_unit.rb +1 -1
- data/lib/square_connect/models/v1_cash_drawer_shift.rb +2 -2
- data/lib/square_connect/models/v1_item.rb +1 -1
- data/lib/square_connect/models/webhook_events.rb +18 -0
- data/lib/square_connect/version.rb +1 -1
- data/spec/models/webhook_events_spec.rb +33 -0
- metadata +6 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f99769ad4fa49e3eb63311a9b9822205a5a994d8f235be983a49f7962226c561
|
|
4
|
+
data.tar.gz: 5756b2a0574786c95979ffe3dc8d7c9a1aef4998be161becb8c3a4bc8e1a0ea0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a3e43992a4082ab40606ce8de929f9cd7b3df3bc255d4c25efba6f60fe1ba9d3bb7936344eaaef07c002d432d47831d313c9b11efde4f82c17354aa98bb684b4
|
|
7
|
+
data.tar.gz: 4286360e7b36a70d452b44ba587e03bfece919f267abd2a070e2ddf688243d542f3873566dc64b07eca07ab206132e91d4cd03fbbdfef3f981155a50d4130efd
|
data/CHANGES.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## Version 2.20190612.1 (2019-06-26)
|
|
4
|
+
|
|
5
|
+
* **Bug fix**: `Transaction.Charge` and `Customers.CreateCustomerCard` request objects — now include the `verification_token` required for [Strong Customer Authentication](https://developer.squareup.com/docs/sca-overview).
|
|
6
|
+
|
|
3
7
|
## Version 2.20190612.0 (2019-06-12)
|
|
4
8
|
|
|
5
9
|
* **BETA releases**:
|
data/README.md
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
Square Connect Ruby SDKs [](https://travis-ci.org/square/connect-ruby-sdk)[](https://badge.fury.io/rb/square_connect)
|
|
3
2
|
==================
|
|
4
3
|
|
|
@@ -11,7 +10,7 @@ for the specification and template files we used to generate this.
|
|
|
11
10
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
|
12
11
|
|
|
13
12
|
- API version: 2.0
|
|
14
|
-
- Package version: 2.20190612.
|
|
13
|
+
- Package version: 2.20190612.1
|
|
15
14
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
|
16
15
|
|
|
17
16
|
For more information, please visit [https://squareup.com/developers](https://squareup.com/developers)
|
|
@@ -20,11 +19,12 @@ For more information, please visit [https://squareup.com/developers](https://squ
|
|
|
20
19
|
## NOTICE: New Beta Ruby SDK Availability
|
|
21
20
|
Square is pleased to announce early access to the beta release of **square.rb**, the new Square Ruby SDK gem. The new **square.rb** gem lets you take payments and run a business with Square APIs including Catalog, Customers, Employees, Inventory, Labor, Locations, Orders, and more. This new gem will eventually replace the square_connect gem and this repo.
|
|
22
21
|
|
|
23
|
-
You can read more about the release in our [blog post](https://developer.squareup.com/blog/announcing-square's-new-ruby-sdk/), or check out the new Square Ruby SDK gem on [GitHub](https://github.com/square/square-ruby-sdk#readme). Or just give **square.rb** a try! You can install the gem from your terminal with the command:
|
|
22
|
+
You can read more about the release in our [blog post](https://developer.squareup.com/blog/announcing-square's-new-ruby-sdk/), or check out the new Square Ruby SDK gem on [GitHub](https://github.com/square/square-ruby-sdk#readme). Or just give **square.rb** a try! You can install the gem from your terminal with the command:
|
|
24
23
|
```ruby
|
|
25
24
|
gem install square.rb
|
|
26
25
|
```
|
|
27
26
|
---
|
|
27
|
+
|
|
28
28
|
## Installation of Square Connect Ruby SDK
|
|
29
29
|
|
|
30
30
|
### Option1: RubyGems
|
|
@@ -658,6 +658,7 @@ Class | Method | HTTP request | Description
|
|
|
658
658
|
- [SquareConnect::V1VariationPricingType](docs/V1VariationPricingType.md)
|
|
659
659
|
- [SquareConnect::VoidTransactionRequest](docs/VoidTransactionRequest.md)
|
|
660
660
|
- [SquareConnect::VoidTransactionResponse](docs/VoidTransactionResponse.md)
|
|
661
|
+
- [SquareConnect::WebhookEvents](docs/WebhookEvents.md)
|
|
661
662
|
- [SquareConnect::Weekday](docs/Weekday.md)
|
|
662
663
|
- [SquareConnect::WorkweekConfig](docs/WorkweekConfig.md)
|
|
663
664
|
|
data/docs/CatalogObject.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
### Description
|
|
4
4
|
|
|
5
|
-
The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid [CatalogImage](#type-catalogimage) object. For a more detailed discussion of the Catalog data model, please see the [Catalog
|
|
5
|
+
The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid [CatalogImage](#type-catalogimage) object. For a more detailed discussion of the Catalog data model, please see the [Design a Catalog](/catalog-api/design-a-catalog) guide.
|
|
6
6
|
|
|
7
7
|
## Properties
|
|
8
8
|
Name | Type | Description | Notes
|
data/docs/ChargeRequest.md
CHANGED
|
@@ -20,5 +20,6 @@ Name | Type | Description | Notes
|
|
|
20
20
|
**buyer_email_address** | **String** | The buyer's email address, if available. | [optional]
|
|
21
21
|
**order_id** | **String** | The ID of the order to associate with this transaction. If you provide this value, the `amount_money` value of your request must __exactly match__ the value of the order's `total_money` field. | [optional]
|
|
22
22
|
**additional_recipients** | [**Array<AdditionalRecipient>**](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 `amount_money` value in your additional_recipients must not be more than 90% of the `amount_money` value in the charge request. The `location_id` must be the valid location of the app owner merchant. This field requires the `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission. This field is currently not supported in sandbox. | [optional]
|
|
23
|
+
**verification_token** | **String** | An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity. | [optional]
|
|
23
24
|
|
|
24
25
|
|
|
@@ -7,8 +7,9 @@ Defines the fields that are included in the request body of a request to the Cre
|
|
|
7
7
|
## Properties
|
|
8
8
|
Name | Type | Description | Notes
|
|
9
9
|
------------ | ------------- | ------------- | -------------
|
|
10
|
-
**card_nonce** | **String** | A card nonce representing the credit card to link to the customer. Card nonces are generated by the `SqPaymentForm` that buyers enter their card information into. See [Embedding the payment form](/
|
|
10
|
+
**card_nonce** | **String** | A card nonce representing the credit card to link to the customer. Card nonces are generated by the `SqPaymentForm` that buyers enter their card information into. See [Embedding the payment form](/payment-form/payment-form-walkthrough) for more information. __Note:__ Card nonces generated by digital wallets (e.g., Apple Pay) cannot be used to create a customer card. |
|
|
11
11
|
**billing_address** | [**Address**](Address.md) | Address information for the card on file. Only the `postal_code` field is required for payments in the US and Canada. | [optional]
|
|
12
|
-
**cardholder_name** | **String** | The
|
|
12
|
+
**cardholder_name** | **String** | The full name printed on the credit card. | [optional]
|
|
13
|
+
**verification_token** | **String** | An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity. | [optional]
|
|
13
14
|
|
|
14
15
|
|
data/docs/CustomersApi.md
CHANGED
|
@@ -85,7 +85,7 @@ end
|
|
|
85
85
|
|
|
86
86
|
api_instance = SquareConnect::CustomersApi.new
|
|
87
87
|
|
|
88
|
-
customer_id = "customer_id_example" # String | The ID of the customer
|
|
88
|
+
customer_id = "customer_id_example" # String | The Square ID of the customer profile the card is linked to.
|
|
89
89
|
|
|
90
90
|
body = SquareConnect::CreateCustomerCardRequest.new # CreateCustomerCardRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
91
91
|
|
|
@@ -103,7 +103,7 @@ end
|
|
|
103
103
|
|
|
104
104
|
Name | Type | Description | Notes
|
|
105
105
|
------------- | ------------- | ------------- | -------------
|
|
106
|
-
**customer_id** | **String**| The ID of the customer
|
|
106
|
+
**customer_id** | **String**| The Square ID of the customer profile the card is linked to. |
|
|
107
107
|
**body** | [**CreateCustomerCardRequest**](CreateCustomerCardRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
108
108
|
|
|
109
109
|
### Return type
|
data/docs/OAuthApi.md
CHANGED
|
@@ -61,7 +61,7 @@ No authorization required
|
|
|
61
61
|
|
|
62
62
|
RenewToken
|
|
63
63
|
|
|
64
|
-
`RenewToken` is deprecated. For information about refreshing OAuth access tokens, see [Renew OAuth Token](/
|
|
64
|
+
`RenewToken` is deprecated. For information about refreshing OAuth access tokens, see [Renew OAuth Token](https://developer.squareup.com/docs/oauth-api/cookbook/renew-oauth-tokens). Renews an OAuth access token before it expires. OAuth access tokens besides your application's personal access token expire after __30 days__. You can also renew expired tokens within __15 days__ of their expiration. You cannot renew an access token that has been expired for more than 15 days. Instead, the associated user must re-complete the OAuth flow from the beginning. __Important:__ The `Authorization` header for this endpoint must have the following format: ``` Authorization: Client APPLICATION_SECRET ``` Replace `APPLICATION_SECRET` with the application secret on the Credentials page in the [application dashboard](https://connect.squareup.com/apps).
|
|
65
65
|
|
|
66
66
|
### Example
|
|
67
67
|
```ruby
|
data/docs/OrderLineItem.md
CHANGED
|
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
|
|
|
9
9
|
------------ | ------------- | ------------- | -------------
|
|
10
10
|
**uid** | **String** | Unique ID that identifies the line item only within this order. This field is read-only. | [optional]
|
|
11
11
|
**name** | **String** | The name of the line item. | [optional]
|
|
12
|
-
**quantity** | **String** | The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`.
|
|
12
|
+
**quantity** | **String** | The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`. |
|
|
13
13
|
**quantity_unit** | [**OrderQuantityUnit**](OrderQuantityUnit.md) | The unit and precision that this line item's quantity is measured in. | [optional]
|
|
14
14
|
**note** | **String** | The note of the line item. | [optional]
|
|
15
15
|
**catalog_object_id** | **String** | The [CatalogItemVariation](#type-catalogitemvariation) id applied to this line item. | [optional]
|
data/docs/OrderQuantityUnit.md
CHANGED
|
@@ -8,6 +8,6 @@ Contains the measurement unit for a quantity and a precision which specifies the
|
|
|
8
8
|
Name | Type | Description | Notes
|
|
9
9
|
------------ | ------------- | ------------- | -------------
|
|
10
10
|
**measurement_unit** | [**MeasurementUnit**](MeasurementUnit.md) | A [MeasurementUnit](#type-measurementunit) that represents the unit of measure for the quantity. | [optional]
|
|
11
|
-
**precision** | **Integer** | For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity. For example, a precision of 1 allows quantities like `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`. Min: 0. Max: 5.
|
|
11
|
+
**precision** | **Integer** | For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity. For example, a precision of 1 allows quantities like `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`. Min: 0. Max: 5. | [optional]
|
|
12
12
|
|
|
13
13
|
|
data/docs/V1CashDrawerShift.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
### Description
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Contains details for a single cash drawer shift.
|
|
6
6
|
|
|
7
7
|
## Properties
|
|
8
8
|
Name | Type | Description | Notes
|
|
@@ -16,7 +16,7 @@ Name | Type | Description | Notes
|
|
|
16
16
|
**opening_employee_id** | **String** | The ID of the employee that started the cash drawer shift. | [optional]
|
|
17
17
|
**ending_employee_id** | **String** | The ID of the employee that ended the cash drawer shift. | [optional]
|
|
18
18
|
**closing_employee_id** | **String** | The ID of the employee that closed the cash drawer shift by auditing the cash drawer's contents. | [optional]
|
|
19
|
-
**description** | **String** |
|
|
19
|
+
**description** | **String** | A description of the cash drawer shift. | [optional]
|
|
20
20
|
**starting_cash_money** | [**V1Money**](V1Money.md) | The amount of money in the cash drawer at the start of the shift. | [optional]
|
|
21
21
|
**cash_payment_money** | [**V1Money**](V1Money.md) | The amount of money added to the cash drawer from cash payments. | [optional]
|
|
22
22
|
**cash_refunds_money** | [**V1Money**](V1Money.md) | The amount of money removed from the cash drawer from cash refunds. This value is always negative or zero. | [optional]
|
data/docs/V1Item.md
CHANGED
|
@@ -18,7 +18,7 @@ Name | Type | Description | Notes
|
|
|
18
18
|
**master_image** | [**V1ItemImage**](V1ItemImage.md) | The item's master image, if any. | [optional]
|
|
19
19
|
**category** | [**V1Category**](V1Category.md) | The category the item belongs to, if any. | [optional]
|
|
20
20
|
**variations** | [**Array<V1Variation>**](V1Variation.md) | The item's variations. You must specify at least one variation. | [optional]
|
|
21
|
-
**modifier_lists** | [**Array<
|
|
21
|
+
**modifier_lists** | [**Array<V1ModifierList>**](V1ModifierList.md) | The modifier lists that apply to the item, if any. | [optional]
|
|
22
22
|
**fees** | [**Array<V1Fee>**](V1Fee.md) | The fees that apply to the item, if any. | [optional]
|
|
23
23
|
**taxable** | **BOOLEAN** | Deprecated. This field is not used. | [optional]
|
|
24
24
|
**category_id** | **String** | The ID of the item's category, if any. | [optional]
|
data/lib/square_connect.rb
CHANGED
|
@@ -455,6 +455,7 @@ require 'square_connect/models/v1_variation_inventory_alert_type'
|
|
|
455
455
|
require 'square_connect/models/v1_variation_pricing_type'
|
|
456
456
|
require 'square_connect/models/void_transaction_request'
|
|
457
457
|
require 'square_connect/models/void_transaction_response'
|
|
458
|
+
require 'square_connect/models/webhook_events'
|
|
458
459
|
require 'square_connect/models/weekday'
|
|
459
460
|
require 'square_connect/models/workweek_config'
|
|
460
461
|
|
|
@@ -74,7 +74,7 @@ module SquareConnect
|
|
|
74
74
|
|
|
75
75
|
# CreateCustomerCard
|
|
76
76
|
# Adds a card on file to an existing customer. As with charges, calls to `CreateCustomerCard` are idempotent. Multiple calls with the same card nonce return the same card record that was created with the provided nonce during the _first_ call. Cards on file are automatically updated on a monthly basis to confirm they are still valid and can be charged.
|
|
77
|
-
# @param customer_id The ID of the customer
|
|
77
|
+
# @param customer_id The Square ID of the customer profile the card is linked to.
|
|
78
78
|
# @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
79
79
|
# @param [Hash] opts the optional parameters
|
|
80
80
|
# @return [CreateCustomerCardResponse]
|
|
@@ -85,7 +85,7 @@ module SquareConnect
|
|
|
85
85
|
|
|
86
86
|
# CreateCustomerCard
|
|
87
87
|
# Adds a card on file to an existing customer. As with charges, calls to `CreateCustomerCard` are idempotent. Multiple calls with the same card nonce return the same card record that was created with the provided nonce during the _first_ call. Cards on file are automatically updated on a monthly basis to confirm they are still valid and can be charged.
|
|
88
|
-
# @param customer_id The ID of the customer
|
|
88
|
+
# @param customer_id The Square ID of the customer profile the card is linked to.
|
|
89
89
|
# @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
90
90
|
# @param [Hash] opts the optional parameters
|
|
91
91
|
# @return [Array<(CreateCustomerCardResponse, Fixnum, Hash)>] CreateCustomerCardResponse data, response status code and response headers
|
|
@@ -73,7 +73,7 @@ module SquareConnect
|
|
|
73
73
|
end
|
|
74
74
|
|
|
75
75
|
# RenewToken
|
|
76
|
-
# `RenewToken` is deprecated. For information about refreshing OAuth access tokens, see [Renew OAuth Token](/
|
|
76
|
+
# `RenewToken` is deprecated. For information about refreshing OAuth access tokens, see [Renew OAuth Token](https://developer.squareup.com/docs/oauth-api/cookbook/renew-oauth-tokens). Renews an OAuth access token before it expires. OAuth access tokens besides your application's personal access token expire after __30 days__. You can also renew expired tokens within __15 days__ of their expiration. You cannot renew an access token that has been expired for more than 15 days. Instead, the associated user must re-complete the OAuth flow from the beginning. __Important:__ The `Authorization` header for this endpoint must have the following format: ``` Authorization: Client APPLICATION_SECRET ``` Replace `APPLICATION_SECRET` with the application secret on the Credentials page in the [application dashboard](https://connect.squareup.com/apps).
|
|
77
77
|
# @param client_id Your application's ID, available from the [application dashboard](https://connect.squareup.com/apps).
|
|
78
78
|
# @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
79
79
|
# @param [Hash] opts the optional parameters
|
|
@@ -84,7 +84,7 @@ module SquareConnect
|
|
|
84
84
|
end
|
|
85
85
|
|
|
86
86
|
# RenewToken
|
|
87
|
-
# `RenewToken` is deprecated. For information about refreshing OAuth access tokens, see [Renew OAuth Token](/
|
|
87
|
+
# `RenewToken` is deprecated. For information about refreshing OAuth access tokens, see [Renew OAuth Token](https://developer.squareup.com/docs/oauth-api/cookbook/renew-oauth-tokens). Renews an OAuth access token before it expires. OAuth access tokens besides your application's personal access token expire after __30 days__. You can also renew expired tokens within __15 days__ of their expiration. You cannot renew an access token that has been expired for more than 15 days. Instead, the associated user must re-complete the OAuth flow from the beginning. __Important:__ The `Authorization` header for this endpoint must have the following format: ``` Authorization: Client APPLICATION_SECRET ``` Replace `APPLICATION_SECRET` with the application secret on the Credentials page in the [application dashboard](https://connect.squareup.com/apps).
|
|
88
88
|
# @param client_id Your application's ID, available from the [application dashboard](https://connect.squareup.com/apps).
|
|
89
89
|
# @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
90
90
|
# @param [Hash] opts the optional parameters
|
|
@@ -30,7 +30,7 @@ module SquareConnect
|
|
|
30
30
|
@config = config
|
|
31
31
|
|
|
32
32
|
# Construct user agent string. Returns slightly different string for JRuby
|
|
33
|
-
@user_agent = "Square-Connect-Ruby/2.20190612.
|
|
33
|
+
@user_agent = "Square-Connect-Ruby/2.20190612.1"
|
|
34
34
|
|
|
35
35
|
@default_headers = {
|
|
36
36
|
'Content-Type' => "application/json",
|
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
|
10
10
|
require 'date'
|
|
11
11
|
|
|
12
12
|
module SquareConnect
|
|
13
|
-
# The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid [CatalogImage](#type-catalogimage) object. For a more detailed discussion of the Catalog data model, please see the [Catalog
|
|
13
|
+
# The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid [CatalogImage](#type-catalogimage) object. For a more detailed discussion of the Catalog data model, please see the [Design a Catalog](/catalog-api/design-a-catalog) guide.
|
|
14
14
|
class CatalogObject
|
|
15
15
|
# The type of this object. Each object type has expected properties expressed in a structured format within its corresponding `*_data` field below. See [CatalogObjectType](#type-catalogobjecttype) for possible values
|
|
16
16
|
attr_accessor :type
|
|
@@ -51,6 +51,9 @@ module SquareConnect
|
|
|
51
51
|
# 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 `amount_money` value in your additional_recipients must not be more than 90% of the `amount_money` value in the charge request. The `location_id` must be the valid location of the app owner merchant. This field requires the `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission. This field is currently not supported in sandbox.
|
|
52
52
|
attr_accessor :additional_recipients
|
|
53
53
|
|
|
54
|
+
# An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity.
|
|
55
|
+
attr_accessor :verification_token
|
|
56
|
+
|
|
54
57
|
|
|
55
58
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
56
59
|
def self.attribute_map
|
|
@@ -67,7 +70,8 @@ module SquareConnect
|
|
|
67
70
|
:'shipping_address' => :'shipping_address',
|
|
68
71
|
:'buyer_email_address' => :'buyer_email_address',
|
|
69
72
|
:'order_id' => :'order_id',
|
|
70
|
-
:'additional_recipients' => :'additional_recipients'
|
|
73
|
+
:'additional_recipients' => :'additional_recipients',
|
|
74
|
+
:'verification_token' => :'verification_token'
|
|
71
75
|
}
|
|
72
76
|
end
|
|
73
77
|
|
|
@@ -86,7 +90,8 @@ module SquareConnect
|
|
|
86
90
|
:'shipping_address' => :'Address',
|
|
87
91
|
:'buyer_email_address' => :'String',
|
|
88
92
|
:'order_id' => :'String',
|
|
89
|
-
:'additional_recipients' => :'Array<AdditionalRecipient>'
|
|
93
|
+
:'additional_recipients' => :'Array<AdditionalRecipient>',
|
|
94
|
+
:'verification_token' => :'String'
|
|
90
95
|
}
|
|
91
96
|
end
|
|
92
97
|
|
|
@@ -152,6 +157,10 @@ module SquareConnect
|
|
|
152
157
|
end
|
|
153
158
|
end
|
|
154
159
|
|
|
160
|
+
if attributes.has_key?(:'verification_token')
|
|
161
|
+
self.verification_token = attributes[:'verification_token']
|
|
162
|
+
end
|
|
163
|
+
|
|
155
164
|
end
|
|
156
165
|
|
|
157
166
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -318,7 +327,8 @@ module SquareConnect
|
|
|
318
327
|
shipping_address == o.shipping_address &&
|
|
319
328
|
buyer_email_address == o.buyer_email_address &&
|
|
320
329
|
order_id == o.order_id &&
|
|
321
|
-
additional_recipients == o.additional_recipients
|
|
330
|
+
additional_recipients == o.additional_recipients &&
|
|
331
|
+
verification_token == o.verification_token
|
|
322
332
|
end
|
|
323
333
|
|
|
324
334
|
# @see the `==` method
|
|
@@ -330,7 +340,7 @@ module SquareConnect
|
|
|
330
340
|
# Calculates hash code according to all attributes.
|
|
331
341
|
# @return [Fixnum] Hash code
|
|
332
342
|
def hash
|
|
333
|
-
[idempotency_key, amount_money, card_nonce, customer_card_id, delay_capture, reference_id, note, customer_id, billing_address, shipping_address, buyer_email_address, order_id, additional_recipients].hash
|
|
343
|
+
[idempotency_key, amount_money, card_nonce, customer_card_id, delay_capture, reference_id, note, customer_id, billing_address, shipping_address, buyer_email_address, order_id, additional_recipients, verification_token].hash
|
|
334
344
|
end
|
|
335
345
|
|
|
336
346
|
# Builds the object from hash
|
|
@@ -12,22 +12,26 @@ require 'date'
|
|
|
12
12
|
module SquareConnect
|
|
13
13
|
# Defines the fields that are included in the request body of a request to the CreateCustomerCard endpoint.
|
|
14
14
|
class CreateCustomerCardRequest
|
|
15
|
-
# A card nonce representing the credit card to link to the customer. Card nonces are generated by the `SqPaymentForm` that buyers enter their card information into. See [Embedding the payment form](/
|
|
15
|
+
# A card nonce representing the credit card to link to the customer. Card nonces are generated by the `SqPaymentForm` that buyers enter their card information into. See [Embedding the payment form](/payment-form/payment-form-walkthrough) for more information. __Note:__ Card nonces generated by digital wallets (e.g., Apple Pay) cannot be used to create a customer card.
|
|
16
16
|
attr_accessor :card_nonce
|
|
17
17
|
|
|
18
18
|
# Address information for the card on file. Only the `postal_code` field is required for payments in the US and Canada.
|
|
19
19
|
attr_accessor :billing_address
|
|
20
20
|
|
|
21
|
-
# The
|
|
21
|
+
# The full name printed on the credit card.
|
|
22
22
|
attr_accessor :cardholder_name
|
|
23
23
|
|
|
24
|
+
# An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity.
|
|
25
|
+
attr_accessor :verification_token
|
|
26
|
+
|
|
24
27
|
|
|
25
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
29
|
def self.attribute_map
|
|
27
30
|
{
|
|
28
31
|
:'card_nonce' => :'card_nonce',
|
|
29
32
|
:'billing_address' => :'billing_address',
|
|
30
|
-
:'cardholder_name' => :'cardholder_name'
|
|
33
|
+
:'cardholder_name' => :'cardholder_name',
|
|
34
|
+
:'verification_token' => :'verification_token'
|
|
31
35
|
}
|
|
32
36
|
end
|
|
33
37
|
|
|
@@ -36,7 +40,8 @@ module SquareConnect
|
|
|
36
40
|
{
|
|
37
41
|
:'card_nonce' => :'String',
|
|
38
42
|
:'billing_address' => :'Address',
|
|
39
|
-
:'cardholder_name' => :'String'
|
|
43
|
+
:'cardholder_name' => :'String',
|
|
44
|
+
:'verification_token' => :'String'
|
|
40
45
|
}
|
|
41
46
|
end
|
|
42
47
|
|
|
@@ -60,6 +65,10 @@ module SquareConnect
|
|
|
60
65
|
self.cardholder_name = attributes[:'cardholder_name']
|
|
61
66
|
end
|
|
62
67
|
|
|
68
|
+
if attributes.has_key?(:'verification_token')
|
|
69
|
+
self.verification_token = attributes[:'verification_token']
|
|
70
|
+
end
|
|
71
|
+
|
|
63
72
|
end
|
|
64
73
|
|
|
65
74
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -87,7 +96,8 @@ module SquareConnect
|
|
|
87
96
|
self.class == o.class &&
|
|
88
97
|
card_nonce == o.card_nonce &&
|
|
89
98
|
billing_address == o.billing_address &&
|
|
90
|
-
cardholder_name == o.cardholder_name
|
|
99
|
+
cardholder_name == o.cardholder_name &&
|
|
100
|
+
verification_token == o.verification_token
|
|
91
101
|
end
|
|
92
102
|
|
|
93
103
|
# @see the `==` method
|
|
@@ -99,7 +109,7 @@ module SquareConnect
|
|
|
99
109
|
# Calculates hash code according to all attributes.
|
|
100
110
|
# @return [Fixnum] Hash code
|
|
101
111
|
def hash
|
|
102
|
-
[card_nonce, billing_address, cardholder_name].hash
|
|
112
|
+
[card_nonce, billing_address, cardholder_name, verification_token].hash
|
|
103
113
|
end
|
|
104
114
|
|
|
105
115
|
# Builds the object from hash
|
|
@@ -18,7 +18,7 @@ module SquareConnect
|
|
|
18
18
|
# The name of the line item.
|
|
19
19
|
attr_accessor :name
|
|
20
20
|
|
|
21
|
-
# The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`.
|
|
21
|
+
# The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`.
|
|
22
22
|
attr_accessor :quantity
|
|
23
23
|
|
|
24
24
|
# The unit and precision that this line item's quantity is measured in.
|
|
@@ -15,7 +15,7 @@ module SquareConnect
|
|
|
15
15
|
# A [MeasurementUnit](#type-measurementunit) that represents the unit of measure for the quantity.
|
|
16
16
|
attr_accessor :measurement_unit
|
|
17
17
|
|
|
18
|
-
# For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity. For example, a precision of 1 allows quantities like `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`. Min: 0. Max: 5.
|
|
18
|
+
# For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity. For example, a precision of 1 allows quantities like `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`. Min: 0. Max: 5.
|
|
19
19
|
attr_accessor :precision
|
|
20
20
|
|
|
21
21
|
|
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
|
10
10
|
require 'date'
|
|
11
11
|
|
|
12
12
|
module SquareConnect
|
|
13
|
-
#
|
|
13
|
+
# Contains details for a single cash drawer shift.
|
|
14
14
|
class V1CashDrawerShift
|
|
15
15
|
# The shift's unique ID.
|
|
16
16
|
attr_accessor :id
|
|
@@ -39,7 +39,7 @@ module SquareConnect
|
|
|
39
39
|
# The ID of the employee that closed the cash drawer shift by auditing the cash drawer's contents.
|
|
40
40
|
attr_accessor :closing_employee_id
|
|
41
41
|
|
|
42
|
-
#
|
|
42
|
+
# A description of the cash drawer shift.
|
|
43
43
|
attr_accessor :description
|
|
44
44
|
|
|
45
45
|
# The amount of money in the cash drawer at the start of the shift.
|
|
@@ -122,7 +122,7 @@ module SquareConnect
|
|
|
122
122
|
:'master_image' => :'V1ItemImage',
|
|
123
123
|
:'category' => :'V1Category',
|
|
124
124
|
:'variations' => :'Array<V1Variation>',
|
|
125
|
-
:'modifier_lists' => :'Array<
|
|
125
|
+
:'modifier_lists' => :'Array<V1ModifierList>',
|
|
126
126
|
:'fees' => :'Array<V1Fee>',
|
|
127
127
|
:'taxable' => :'BOOLEAN',
|
|
128
128
|
:'category_id' => :'String',
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Square Connect API
|
|
3
|
+
|
|
4
|
+
OpenAPI spec version: 2.0
|
|
5
|
+
Contact: developers@squareup.com
|
|
6
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
7
|
+
|
|
8
|
+
=end
|
|
9
|
+
|
|
10
|
+
require 'date'
|
|
11
|
+
|
|
12
|
+
module SquareConnect
|
|
13
|
+
class WebhookEvents
|
|
14
|
+
|
|
15
|
+
UPDATED = "inventory.count.updated".freeze
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Square Connect API
|
|
3
|
+
|
|
4
|
+
OpenAPI spec version: 2.0
|
|
5
|
+
Contact: developers@squareup.com
|
|
6
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
7
|
+
|
|
8
|
+
=end
|
|
9
|
+
|
|
10
|
+
require 'spec_helper'
|
|
11
|
+
require 'json'
|
|
12
|
+
require 'date'
|
|
13
|
+
|
|
14
|
+
# Unit tests for SquareConnect::WebhookEvents
|
|
15
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
|
16
|
+
# Please update as you see appropriate
|
|
17
|
+
describe 'WebhookEvents' do
|
|
18
|
+
before do
|
|
19
|
+
# run before each test
|
|
20
|
+
@instance = SquareConnect::WebhookEvents.new
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
after do
|
|
24
|
+
# run after each test
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
describe 'test an instance of WebhookEvents' do
|
|
28
|
+
it 'should create an instact of WebhookEvents' do
|
|
29
|
+
expect(@instance).to be_instance_of(SquareConnect::WebhookEvents)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: square_connect
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.20190612.
|
|
4
|
+
version: 2.20190612.1.314
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Square, Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-06-
|
|
11
|
+
date: 2019-06-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -661,6 +661,7 @@ files:
|
|
|
661
661
|
- docs/V1VariationPricingType.md
|
|
662
662
|
- docs/VoidTransactionRequest.md
|
|
663
663
|
- docs/VoidTransactionResponse.md
|
|
664
|
+
- docs/WebhookEvents.md
|
|
664
665
|
- docs/Weekday.md
|
|
665
666
|
- docs/WorkweekConfig.md
|
|
666
667
|
- lib/square_connect.rb
|
|
@@ -1125,6 +1126,7 @@ files:
|
|
|
1125
1126
|
- lib/square_connect/models/v1_variation_pricing_type.rb
|
|
1126
1127
|
- lib/square_connect/models/void_transaction_request.rb
|
|
1127
1128
|
- lib/square_connect/models/void_transaction_response.rb
|
|
1129
|
+
- lib/square_connect/models/webhook_events.rb
|
|
1128
1130
|
- lib/square_connect/models/weekday.rb
|
|
1129
1131
|
- lib/square_connect/models/workweek_config.rb
|
|
1130
1132
|
- lib/square_connect/version.rb
|
|
@@ -1588,6 +1590,7 @@ files:
|
|
|
1588
1590
|
- spec/models/v1_variation_spec.rb
|
|
1589
1591
|
- spec/models/void_transaction_request_spec.rb
|
|
1590
1592
|
- spec/models/void_transaction_response_spec.rb
|
|
1593
|
+
- spec/models/webhook_events_spec.rb
|
|
1591
1594
|
- spec/models/weekday_spec.rb
|
|
1592
1595
|
- spec/models/workweek_config_spec.rb
|
|
1593
1596
|
- spec/spec_helper.rb
|
|
@@ -2059,6 +2062,7 @@ test_files:
|
|
|
2059
2062
|
- spec/models/v1_timecard_event_spec.rb
|
|
2060
2063
|
- spec/models/v1_settlement_spec.rb
|
|
2061
2064
|
- spec/models/shift_sort_field_spec.rb
|
|
2065
|
+
- spec/models/webhook_events_spec.rb
|
|
2062
2066
|
- spec/models/v1_merchant_account_type_spec.rb
|
|
2063
2067
|
- spec/models/customer_query_spec.rb
|
|
2064
2068
|
- spec/models/v1_create_modifier_option_request_spec.rb
|