square_connect 2.5.0.180 → 2.5.1.183
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +7 -0
- data/README.md +8 -1
- data/docs/AdditionalRecipient.md +1 -1
- data/docs/CatalogItemVariation.md +1 -0
- data/docs/ChargeRequest.md +1 -1
- data/docs/CreateCheckoutRequest.md +1 -1
- data/docs/Location.md +1 -0
- data/docs/ReportingApi.md +2 -2
- data/docs/Tender.md +1 -0
- data/docs/V1PageCell.md +2 -2
- data/lib/square_connect/api/reporting_api.rb +4 -4
- data/lib/square_connect/api_client.rb +1 -1
- data/lib/square_connect/configuration.rb +7 -0
- data/lib/square_connect/models/additional_recipient.rb +1 -1
- data/lib/square_connect/models/catalog_item_variation.rb +11 -1
- data/lib/square_connect/models/charge_request.rb +1 -1
- data/lib/square_connect/models/create_checkout_request.rb +1 -1
- data/lib/square_connect/models/location.rb +14 -4
- data/lib/square_connect/models/tender.rb +11 -1
- data/lib/square_connect/models/v1_page_cell.rb +28 -8
- data/lib/square_connect/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fca33264f4e4b96e8d3546d8bf7dd7612993e7612b8ad835189bd1305de166cb
|
4
|
+
data.tar.gz: 653d2dd7c502cdde0eb577240652f6214f62b92186edee92efd40612661da6d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 711467aec78e0d39e6417797c8bedadf1efb414f9b5d27fe9f1eacaea0b78eafcecb987d15f360abac64170394100d9abf947e40bfae90b8ad576d07430e3c33
|
7
|
+
data.tar.gz: 840612dd20d96e41fb0fbebf7afcc680b45f1c425a053c532e88a28a4d58ef2b1e9accb8fd969f55f549a9ed8f1076c4d63283211f0ed1e0403a6de206e2d596
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## Version 2.5.1 (2017-11-10)
|
4
|
+
|
5
|
+
* `ordinal` is added to `CatalogItemVariation`
|
6
|
+
* `website_url` is added to `Location`
|
7
|
+
* `tip_money` is added to `Tender`
|
8
|
+
* Changed `object_type` and `placeholder_type` from lists to single values in `V1PageCell` to mirror data model
|
9
|
+
|
3
10
|
## Version 2.5 (2017-11-02)
|
4
11
|
|
5
12
|
### New features: Transaction API and Reporting API
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ for the specification and template files we used to generate this.
|
|
10
10
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
11
11
|
|
12
12
|
- API version: 2.0
|
13
|
-
- Package version: 2.5.
|
13
|
+
- Package version: 2.5.1
|
14
14
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
15
15
|
|
16
16
|
For more information, please visit [https://squareup.com/developers](https://squareup.com/developers)
|
@@ -384,6 +384,13 @@ Class | Method | HTTP request | Description
|
|
384
384
|
- EMPLOYEES_WRITE: POST, PUT, and DELETE endpoints related to employee management
|
385
385
|
- TIMECARDS_READ: GET endpoints related to employee timecards
|
386
386
|
- TIMECARDS_WRITE: POST, PUT, and DELETE endpoints related to employee timecards
|
387
|
+
- PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS: Allow third party applications to deduct a portion of each transaction amount.
|
388
|
+
|
389
|
+
### oauth2ClientSecret
|
390
|
+
|
391
|
+
- **Type**: API key
|
392
|
+
- **API key parameter name**: Authorization
|
393
|
+
- **Location**: HTTP header
|
387
394
|
|
388
395
|
|
389
396
|
## Pagination of V1 Endpoints
|
data/docs/AdditionalRecipient.md
CHANGED
@@ -10,6 +10,6 @@ Name | Type | Description | Notes
|
|
10
10
|
**location_id** | **String** | The location ID for a recipient (other than the merchant) receiving a portion of this tender. |
|
11
11
|
**description** | **String** | The description of the additional recipient. |
|
12
12
|
**amount_money** | [**Money**](Money.md) | The amount of money distributed to the recipient. |
|
13
|
-
**receivable_id** | **String** | The unique ID for this [AdditionalRecipientReceivable](#type-additionalrecipientreceivable), assigned by the server.
|
13
|
+
**receivable_id** | **String** | The unique ID for this [AdditionalRecipientReceivable](#type-additionalrecipientreceivable), assigned by the server. | [optional]
|
14
14
|
|
15
15
|
|
@@ -11,6 +11,7 @@ Name | Type | Description | Notes
|
|
11
11
|
**name** | **String** | The item variation's name. Searchable. | [optional]
|
12
12
|
**sku** | **String** | The item variation's SKU, if any. Searchable. | [optional]
|
13
13
|
**upc** | **String** | The item variation's UPC, if any. Searchable. | [optional]
|
14
|
+
**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's position. On reads, the value is not guaranteed to be sequential or unique. | [optional]
|
14
15
|
**pricing_type** | **String** | Indicates whether the item variation's price is fixed or determined at the time of sale. See [CatalogPricingType](#type-catalogpricingtype) for all possible values. | [optional]
|
15
16
|
**price_money** | [**Money**](Money.md) | The item variation's price, if fixed pricing is used. | [optional]
|
16
17
|
**location_overrides** | [**Array<ItemVariationLocationOverrides>**](ItemVariationLocationOverrides.md) | Per-[location](#type-location) price and inventory overrides. | [optional]
|
data/docs/ChargeRequest.md
CHANGED
@@ -19,6 +19,6 @@ Name | Type | Description | Notes
|
|
19
19
|
**shipping_address** | [**Address**](Address.md) | The buyer's shipping address, if available. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor `billing_address` is provided. | [optional]
|
20
20
|
**buyer_email_address** | **String** | The buyer's email address, if available. This value is optional, but this transaction is ineligible for chargeback protection if it is not provided. | [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 `total_money` value of the order's `order_amounts` field. | [optional]
|
22
|
-
**additional_recipients** | [**Array<AdditionalRecipient>**](AdditionalRecipient.md) | The basic primitive of multi
|
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 you charge's request. The `location_id` must be the valid location of the app owner merchant. This field requires `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission. This field is currently not supported in sandbox. | [optional]
|
23
23
|
|
24
24
|
|
@@ -14,6 +14,6 @@ Name | Type | Description | Notes
|
|
14
14
|
**pre_populate_buyer_email** | **String** | If provided, the buyer's email is pre-populated on the checkout page as an editable text field. Default: none; only exists if explicitly set. | [optional]
|
15
15
|
**pre_populate_shipping_address** | [**Address**](Address.md) | If provided, the buyer's shipping info is pre-populated on the checkout page as editable text fields. Default: none; only exists if explicitly set. | [optional]
|
16
16
|
**redirect_url** | **String** | The URL to redirect to after checkout is completed with `checkoutId`, Square's `orderId`, `transactionId`, and `referenceId` appended as URL parameters. For example, if the provided redirect_url is `http://www.example.com/order-complete`, a successful transaction redirects the customer to: `http://www.example.com/order-complete?checkoutId=xxxxxx&orderId=xxxxxx&referenceId=xxxxxx&transactionId=xxxxxx` 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]
|
17
|
-
**additional_recipients** | [**Array<ChargeRequestAdditionalRecipient>**](ChargeRequestAdditionalRecipient.md) | The basic primitive of multi
|
17
|
+
**additional_recipients** | [**Array<ChargeRequestAdditionalRecipient>**](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 `amount_money` value in your additional_recipients must not be more than 90% of the `total_money` calculated by Square for your order. The `location_id` must be the valid location of the app owner merchant. This field requires `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission. This field is currently not supported in sandbox. | [optional]
|
18
18
|
|
19
19
|
|
data/docs/Location.md
CHANGED
@@ -21,5 +21,6 @@ Name | Type | Description | Notes
|
|
21
21
|
**phone_number** | **String** | The location's phone_number. | [optional]
|
22
22
|
**business_name** | **String** | The location's business_name which is shown to its customers. For example, this is the name printed on its customer's receipts. | [optional]
|
23
23
|
**type** | **String** | The location'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]
|
24
|
+
**website_url** | **String** | The location's website, as set by the account owner in the Square dashboard. Default: none; only exists if explicitly set. | [optional]
|
24
25
|
|
25
26
|
|
data/docs/ReportingApi.md
CHANGED
@@ -13,7 +13,7 @@ Method | HTTP request | Description
|
|
13
13
|
|
14
14
|
ListAdditionalRecipientReceivableRefunds
|
15
15
|
|
16
|
-
|
16
|
+
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 `additional_recipients` field in a transaction. Max results per [page](#paginatingresults): 50
|
17
17
|
|
18
18
|
### Example
|
19
19
|
```ruby
|
@@ -75,7 +75,7 @@ Name | Type | Description | Notes
|
|
75
75
|
|
76
76
|
ListAdditionalRecipientReceivables
|
77
77
|
|
78
|
-
|
78
|
+
Returns a list of receivables (across all possible sending locations) representing monies credited to the provided location ID by another Square account using the `additional_recipients` field in a transaction. Max results per [page](#paginatingresults): 50
|
79
79
|
|
80
80
|
### Example
|
81
81
|
```ruby
|
data/docs/Tender.md
CHANGED
@@ -13,6 +13,7 @@ Name | Type | Description | Notes
|
|
13
13
|
**created_at** | **String** | The time when the tender was created, in RFC 3339 format. | [optional]
|
14
14
|
**note** | **String** | An optional note associated with the tender at the time of payment. | [optional]
|
15
15
|
**amount_money** | [**Money**](Money.md) | The amount of the tender. | [optional]
|
16
|
+
**tip_money** | [**Money**](Money.md) | The tip's amount of the tender. | [optional]
|
16
17
|
**processing_fee_money** | [**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]
|
17
18
|
**customer_id** | **String** | If the tender is associated with a customer or represents a customer's card on file, this is the ID of the associated customer. | [optional]
|
18
19
|
**type** | **String** | The type of tender, such as `CARD` or `CASH`. |
|
data/docs/V1PageCell.md
CHANGED
@@ -8,8 +8,8 @@ Name | Type | Description | Notes
|
|
8
8
|
**page_id** | **String** | The unique identifier of the page the cell is included on. | [optional]
|
9
9
|
**row** | **Integer** | The row of the cell. Always an integer between 0 and 4, inclusive. | [optional]
|
10
10
|
**column** | **Integer** | The column of the cell. Always an integer between 0 and 4, inclusive. | [optional]
|
11
|
-
**object_type** | **
|
11
|
+
**object_type** | **String** | The type of entity represented in the cell (ITEM, DISCOUNT, CATEGORY, or PLACEHOLDER). | [optional]
|
12
12
|
**object_id** | **String** | The unique identifier of the entity represented in the cell. Not present for cells with an object_type of PLACEHOLDER. | [optional]
|
13
|
-
**placeholder_type** | **
|
13
|
+
**placeholder_type** | **String** | For a cell with an object_type of PLACEHOLDER, this value indicates the cell's special behavior. | [optional]
|
14
14
|
|
15
15
|
|
@@ -18,7 +18,7 @@ module SquareConnect
|
|
18
18
|
end
|
19
19
|
|
20
20
|
# ListAdditionalRecipientReceivableRefunds
|
21
|
-
#
|
21
|
+
# 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 `additional_recipients` field in a transaction. Max results per [page](#paginatingresults): 50
|
22
22
|
# @param location_id The ID of the location to list AdditionalRecipientReceivableRefunds for.
|
23
23
|
# @param [Hash] opts the optional parameters
|
24
24
|
# @option opts [String] :begin_time 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.
|
@@ -32,7 +32,7 @@ module SquareConnect
|
|
32
32
|
end
|
33
33
|
|
34
34
|
# ListAdditionalRecipientReceivableRefunds
|
35
|
-
#
|
35
|
+
# 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 `additional_recipients` field in a transaction. Max results per [page](#paginatingresults): 50
|
36
36
|
# @param location_id The ID of the location to list AdditionalRecipientReceivableRefunds for.
|
37
37
|
# @param [Hash] opts the optional parameters
|
38
38
|
# @option opts [String] :begin_time 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.
|
@@ -86,7 +86,7 @@ module SquareConnect
|
|
86
86
|
end
|
87
87
|
|
88
88
|
# ListAdditionalRecipientReceivables
|
89
|
-
#
|
89
|
+
# Returns a list of receivables (across all possible sending locations) representing monies credited to the provided location ID by another Square account using the `additional_recipients` field in a transaction. Max results per [page](#paginatingresults): 50
|
90
90
|
# @param location_id The ID of the location to list AdditionalRecipientReceivables for.
|
91
91
|
# @param [Hash] opts the optional parameters
|
92
92
|
# @option opts [String] :begin_time 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.
|
@@ -100,7 +100,7 @@ module SquareConnect
|
|
100
100
|
end
|
101
101
|
|
102
102
|
# ListAdditionalRecipientReceivables
|
103
|
-
#
|
103
|
+
# Returns a list of receivables (across all possible sending locations) representing monies credited to the provided location ID by another Square account using the `additional_recipients` field in a transaction. Max results per [page](#paginatingresults): 50
|
104
104
|
# @param location_id The ID of the location to list AdditionalRecipientReceivables for.
|
105
105
|
# @param [Hash] opts the optional parameters
|
106
106
|
# @option opts [String] :begin_time 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.
|
@@ -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.5.
|
33
|
+
@user_agent = "Square-Connect-Ruby/2.5.1"
|
34
34
|
|
35
35
|
@default_headers = {
|
36
36
|
'Content-Type' => "application/json",
|
@@ -194,6 +194,13 @@ module SquareConnect
|
|
194
194
|
key: 'Authorization',
|
195
195
|
value: "Bearer #{access_token}"
|
196
196
|
},
|
197
|
+
'oauth2ClientSecret' =>
|
198
|
+
{
|
199
|
+
type: 'api_key',
|
200
|
+
in: 'header',
|
201
|
+
key: 'Authorization',
|
202
|
+
value: api_key_with_prefix('Authorization')
|
203
|
+
},
|
197
204
|
}
|
198
205
|
end
|
199
206
|
end
|
@@ -21,7 +21,7 @@ module SquareConnect
|
|
21
21
|
# The amount of money distributed to the recipient.
|
22
22
|
attr_accessor :amount_money
|
23
23
|
|
24
|
-
# The unique ID for this [AdditionalRecipientReceivable](#type-additionalrecipientreceivable), assigned by the server.
|
24
|
+
# The unique ID for this [AdditionalRecipientReceivable](#type-additionalrecipientreceivable), assigned by the server.
|
25
25
|
attr_accessor :receivable_id
|
26
26
|
|
27
27
|
|
@@ -24,6 +24,9 @@ module SquareConnect
|
|
24
24
|
# The item variation's UPC, if any. Searchable.
|
25
25
|
attr_accessor :upc
|
26
26
|
|
27
|
+
# 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's position. On reads, the value is not guaranteed to be sequential or unique.
|
28
|
+
attr_accessor :ordinal
|
29
|
+
|
27
30
|
# Indicates whether the item variation's price is fixed or determined at the time of sale. See [CatalogPricingType](#type-catalogpricingtype) for all possible values.
|
28
31
|
attr_accessor :pricing_type
|
29
32
|
|
@@ -77,6 +80,7 @@ module SquareConnect
|
|
77
80
|
:'name' => :'name',
|
78
81
|
:'sku' => :'sku',
|
79
82
|
:'upc' => :'upc',
|
83
|
+
:'ordinal' => :'ordinal',
|
80
84
|
:'pricing_type' => :'pricing_type',
|
81
85
|
:'price_money' => :'price_money',
|
82
86
|
:'location_overrides' => :'location_overrides',
|
@@ -95,6 +99,7 @@ module SquareConnect
|
|
95
99
|
:'name' => :'String',
|
96
100
|
:'sku' => :'String',
|
97
101
|
:'upc' => :'String',
|
102
|
+
:'ordinal' => :'Integer',
|
98
103
|
:'pricing_type' => :'String',
|
99
104
|
:'price_money' => :'Money',
|
100
105
|
:'location_overrides' => :'Array<ItemVariationLocationOverrides>',
|
@@ -130,6 +135,10 @@ module SquareConnect
|
|
130
135
|
self.upc = attributes[:'upc']
|
131
136
|
end
|
132
137
|
|
138
|
+
if attributes.has_key?(:'ordinal')
|
139
|
+
self.ordinal = attributes[:'ordinal']
|
140
|
+
end
|
141
|
+
|
133
142
|
if attributes.has_key?(:'pricing_type')
|
134
143
|
self.pricing_type = attributes[:'pricing_type']
|
135
144
|
end
|
@@ -212,6 +221,7 @@ module SquareConnect
|
|
212
221
|
name == o.name &&
|
213
222
|
sku == o.sku &&
|
214
223
|
upc == o.upc &&
|
224
|
+
ordinal == o.ordinal &&
|
215
225
|
pricing_type == o.pricing_type &&
|
216
226
|
price_money == o.price_money &&
|
217
227
|
location_overrides == o.location_overrides &&
|
@@ -231,7 +241,7 @@ module SquareConnect
|
|
231
241
|
# Calculates hash code according to all attributes.
|
232
242
|
# @return [Fixnum] Hash code
|
233
243
|
def hash
|
234
|
-
[item_id, name, sku, upc, pricing_type, price_money, location_overrides, track_inventory, inventory_alert_type, inventory_alert_threshold, user_data, service_duration].hash
|
244
|
+
[item_id, name, sku, upc, ordinal, pricing_type, price_money, location_overrides, track_inventory, inventory_alert_type, inventory_alert_threshold, user_data, service_duration].hash
|
235
245
|
end
|
236
246
|
|
237
247
|
# Builds the object from hash
|
@@ -48,7 +48,7 @@ module SquareConnect
|
|
48
48
|
# 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 `total_money` value of the order's `order_amounts` field.
|
49
49
|
attr_accessor :order_id
|
50
50
|
|
51
|
-
# The basic primitive of multi
|
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 you charge's request. The `location_id` must be the valid location of the app owner merchant. This field requires `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission. This field is currently not supported in sandbox.
|
52
52
|
attr_accessor :additional_recipients
|
53
53
|
|
54
54
|
|
@@ -33,7 +33,7 @@ module SquareConnect
|
|
33
33
|
# The URL to redirect to after checkout is completed with `checkoutId`, Square's `orderId`, `transactionId`, and `referenceId` appended as URL parameters. For example, if the provided redirect_url is `http://www.example.com/order-complete`, a successful transaction redirects the customer to: `http://www.example.com/order-complete?checkoutId=xxxxxx&orderId=xxxxxx&referenceId=xxxxxx&transactionId=xxxxxx` 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.
|
34
34
|
attr_accessor :redirect_url
|
35
35
|
|
36
|
-
# The basic primitive of multi
|
36
|
+
# 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 `total_money` calculated by Square for your order. The `location_id` must be the valid location of the app owner merchant. This field requires `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission. This field is currently not supported in sandbox.
|
37
37
|
attr_accessor :additional_recipients
|
38
38
|
|
39
39
|
|
@@ -54,6 +54,9 @@ module SquareConnect
|
|
54
54
|
# The location'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.
|
55
55
|
attr_accessor :type
|
56
56
|
|
57
|
+
# The location's website, as set by the account owner in the Square dashboard. Default: none; only exists if explicitly set.
|
58
|
+
attr_accessor :website_url
|
59
|
+
|
57
60
|
class EnumAttributeValidator
|
58
61
|
attr_reader :datatype
|
59
62
|
attr_reader :allowable_values
|
@@ -92,7 +95,8 @@ module SquareConnect
|
|
92
95
|
:'currency' => :'currency',
|
93
96
|
:'phone_number' => :'phone_number',
|
94
97
|
:'business_name' => :'business_name',
|
95
|
-
:'type' => :'type'
|
98
|
+
:'type' => :'type',
|
99
|
+
:'website_url' => :'website_url'
|
96
100
|
}
|
97
101
|
end
|
98
102
|
|
@@ -112,7 +116,8 @@ module SquareConnect
|
|
112
116
|
:'currency' => :'String',
|
113
117
|
:'phone_number' => :'String',
|
114
118
|
:'business_name' => :'String',
|
115
|
-
:'type' => :'String'
|
119
|
+
:'type' => :'String',
|
120
|
+
:'website_url' => :'String'
|
116
121
|
}
|
117
122
|
end
|
118
123
|
|
@@ -182,6 +187,10 @@ module SquareConnect
|
|
182
187
|
self.type = attributes[:'type']
|
183
188
|
end
|
184
189
|
|
190
|
+
if attributes.has_key?(:'website_url')
|
191
|
+
self.website_url = attributes[:'website_url']
|
192
|
+
end
|
193
|
+
|
185
194
|
end
|
186
195
|
|
187
196
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -263,7 +272,8 @@ module SquareConnect
|
|
263
272
|
currency == o.currency &&
|
264
273
|
phone_number == o.phone_number &&
|
265
274
|
business_name == o.business_name &&
|
266
|
-
type == o.type
|
275
|
+
type == o.type &&
|
276
|
+
website_url == o.website_url
|
267
277
|
end
|
268
278
|
|
269
279
|
# @see the `==` method
|
@@ -275,7 +285,7 @@ module SquareConnect
|
|
275
285
|
# Calculates hash code according to all attributes.
|
276
286
|
# @return [Fixnum] Hash code
|
277
287
|
def hash
|
278
|
-
[id, name, address, timezone, capabilities, status, created_at, merchant_id, country, language_code, currency, phone_number, business_name, type].hash
|
288
|
+
[id, name, address, timezone, capabilities, status, created_at, merchant_id, country, language_code, currency, phone_number, business_name, type, website_url].hash
|
279
289
|
end
|
280
290
|
|
281
291
|
# Builds the object from hash
|
@@ -30,6 +30,9 @@ module SquareConnect
|
|
30
30
|
# The amount of the tender.
|
31
31
|
attr_accessor :amount_money
|
32
32
|
|
33
|
+
# The tip's amount of the tender.
|
34
|
+
attr_accessor :tip_money
|
35
|
+
|
33
36
|
# 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.
|
34
37
|
attr_accessor :processing_fee_money
|
35
38
|
|
@@ -79,6 +82,7 @@ module SquareConnect
|
|
79
82
|
:'created_at' => :'created_at',
|
80
83
|
:'note' => :'note',
|
81
84
|
:'amount_money' => :'amount_money',
|
85
|
+
:'tip_money' => :'tip_money',
|
82
86
|
:'processing_fee_money' => :'processing_fee_money',
|
83
87
|
:'customer_id' => :'customer_id',
|
84
88
|
:'type' => :'type',
|
@@ -97,6 +101,7 @@ module SquareConnect
|
|
97
101
|
:'created_at' => :'String',
|
98
102
|
:'note' => :'String',
|
99
103
|
:'amount_money' => :'Money',
|
104
|
+
:'tip_money' => :'Money',
|
100
105
|
:'processing_fee_money' => :'Money',
|
101
106
|
:'customer_id' => :'String',
|
102
107
|
:'type' => :'String',
|
@@ -138,6 +143,10 @@ module SquareConnect
|
|
138
143
|
self.amount_money = attributes[:'amount_money']
|
139
144
|
end
|
140
145
|
|
146
|
+
if attributes.has_key?(:'tip_money')
|
147
|
+
self.tip_money = attributes[:'tip_money']
|
148
|
+
end
|
149
|
+
|
141
150
|
if attributes.has_key?(:'processing_fee_money')
|
142
151
|
self.processing_fee_money = attributes[:'processing_fee_money']
|
143
152
|
end
|
@@ -207,6 +216,7 @@ module SquareConnect
|
|
207
216
|
created_at == o.created_at &&
|
208
217
|
note == o.note &&
|
209
218
|
amount_money == o.amount_money &&
|
219
|
+
tip_money == o.tip_money &&
|
210
220
|
processing_fee_money == o.processing_fee_money &&
|
211
221
|
customer_id == o.customer_id &&
|
212
222
|
type == o.type &&
|
@@ -224,7 +234,7 @@ module SquareConnect
|
|
224
234
|
# Calculates hash code according to all attributes.
|
225
235
|
# @return [Fixnum] Hash code
|
226
236
|
def hash
|
227
|
-
[id, location_id, transaction_id, created_at, note, amount_money, processing_fee_money, customer_id, type, card_details, cash_details, additional_recipients].hash
|
237
|
+
[id, location_id, transaction_id, created_at, note, amount_money, tip_money, processing_fee_money, customer_id, type, card_details, cash_details, additional_recipients].hash
|
228
238
|
end
|
229
239
|
|
230
240
|
# Builds the object from hash
|
@@ -70,9 +70,9 @@ module SquareConnect
|
|
70
70
|
:'page_id' => :'String',
|
71
71
|
:'row' => :'Integer',
|
72
72
|
:'column' => :'Integer',
|
73
|
-
:'object_type' => :'
|
73
|
+
:'object_type' => :'String',
|
74
74
|
:'object_id' => :'String',
|
75
|
-
:'placeholder_type' => :'
|
75
|
+
:'placeholder_type' => :'String'
|
76
76
|
}
|
77
77
|
end
|
78
78
|
|
@@ -97,9 +97,7 @@ module SquareConnect
|
|
97
97
|
end
|
98
98
|
|
99
99
|
if attributes.has_key?(:'object_type')
|
100
|
-
|
101
|
-
self.object_type = value
|
102
|
-
end
|
100
|
+
self.object_type = attributes[:'object_type']
|
103
101
|
end
|
104
102
|
|
105
103
|
if attributes.has_key?(:'object_id')
|
@@ -107,9 +105,7 @@ module SquareConnect
|
|
107
105
|
end
|
108
106
|
|
109
107
|
if attributes.has_key?(:'placeholder_type')
|
110
|
-
|
111
|
-
self.placeholder_type = value
|
112
|
-
end
|
108
|
+
self.placeholder_type = attributes[:'placeholder_type']
|
113
109
|
end
|
114
110
|
|
115
111
|
end
|
@@ -124,9 +120,33 @@ module SquareConnect
|
|
124
120
|
# Check to see if the all the properties in the model are valid
|
125
121
|
# @return true if the model is valid
|
126
122
|
def valid?
|
123
|
+
object_type_validator = EnumAttributeValidator.new('String', ["ITEM", "DISCOUNT", "CATEGORY", "PLACEHOLDER"])
|
124
|
+
return false unless object_type_validator.valid?(@object_type)
|
125
|
+
placeholder_type_validator = EnumAttributeValidator.new('String', ["ALL_ITEMS", "DISCOUNTS_CATEGORY", "REWARDS_FINDER"])
|
126
|
+
return false unless placeholder_type_validator.valid?(@placeholder_type)
|
127
127
|
return true
|
128
128
|
end
|
129
129
|
|
130
|
+
# Custom attribute writer method checking allowed values (enum).
|
131
|
+
# @param [Object] object_type Object to be assigned
|
132
|
+
def object_type=(object_type)
|
133
|
+
validator = EnumAttributeValidator.new('String', ["ITEM", "DISCOUNT", "CATEGORY", "PLACEHOLDER"])
|
134
|
+
unless validator.valid?(object_type)
|
135
|
+
fail ArgumentError, "invalid value for 'object_type', must be one of #{validator.allowable_values}."
|
136
|
+
end
|
137
|
+
@object_type = object_type
|
138
|
+
end
|
139
|
+
|
140
|
+
# Custom attribute writer method checking allowed values (enum).
|
141
|
+
# @param [Object] placeholder_type Object to be assigned
|
142
|
+
def placeholder_type=(placeholder_type)
|
143
|
+
validator = EnumAttributeValidator.new('String', ["ALL_ITEMS", "DISCOUNTS_CATEGORY", "REWARDS_FINDER"])
|
144
|
+
unless validator.valid?(placeholder_type)
|
145
|
+
fail ArgumentError, "invalid value for 'placeholder_type', must be one of #{validator.allowable_values}."
|
146
|
+
end
|
147
|
+
@placeholder_type = placeholder_type
|
148
|
+
end
|
149
|
+
|
130
150
|
# Checks equality by comparing each attribute.
|
131
151
|
# @param [Object] Object to be compared
|
132
152
|
def ==(o)
|
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.5.
|
4
|
+
version: 2.5.1.183
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Square, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -806,7 +806,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
806
806
|
version: '0'
|
807
807
|
requirements: []
|
808
808
|
rubyforge_project:
|
809
|
-
rubygems_version: 2.7.
|
809
|
+
rubygems_version: 2.7.2
|
810
810
|
signing_key:
|
811
811
|
specification_version: 4
|
812
812
|
summary: Square Connect API Ruby Gem
|