simplify 1.6.0 → 1.7.0

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 CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 545d426adaf264152b6db339b5ba1946666d2a4d
4
- data.tar.gz: f2de05a3f0e4aac1683f1e0ddde009b6f6f36d4b
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MWM2NTcwY2YyYmMzNGQ2NmJlMjdhYWQ2Njc3NGE2YTUzYzY2NzJjNA==
5
+ data.tar.gz: !binary |-
6
+ ZDZhNzZhZWZmZDcwOWUyOWQ1YjY0ZDJiNDQ4OGYzODg0NzAxNDE3MQ==
5
7
  SHA512:
6
- metadata.gz: d4e4b7413b649e8b1b099070181cd5ffebe02b964dcc3823c3c19e3e3b736caae227407d696e372618d8446edef3ceccf23fa7a9ca4d074722d7e2f4889dcf8f
7
- data.tar.gz: 7f6dfa44d51b3419cfc9d4ffecc266361e755590fc89f702d28d5758a8c512fcc93d673c2125951198da2fbbc9be5e457b3586b904cef209ffc1ef5918ba92cd
8
+ metadata.gz: !binary |-
9
+ MDgxNDZmMGExYjg5ZWQ4NWEwMDE1ZjlmNzA4OTRkNDE3MDRjZDhiMjExODll
10
+ ZGRhZmZlN2I0Y2Q0Nzk2MjAwMGRlNzYxZGRmZTg0M2IxZDI5YzY2OWQ3YThk
11
+ NzI3ZGZiNGZlNTk4OGU0MjEwOTIwNDA0YThiYTVkYzU0OThiODY=
12
+ data.tar.gz: !binary |-
13
+ MzBhOWI4ZGNlYjExODg1ZDZmN2NlMjFhODE4MDY0ODU5OTczOWI2NTk5MTVj
14
+ MTc0NDk1M2E1ZmE4NDBkMTNmYjA4Njg4MzIxMjNjYmQ0M2VlNWY3YTQ4NjM1
15
+ NDE5YjcwNDM3M2UzNzEzODBiZTY5ZjdhOGMwNTY2NTYyZGEwY2I=
@@ -66,7 +66,7 @@ class Authorization < Hash
66
66
  # * <code>card => addressLine1</code> Address of the cardholder. [max length: 255]
67
67
  # * <code>card => addressLine2</code> Address of the cardholder if needed. [max length: 255]
68
68
  # * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. [max length: 255]
69
- # * <code>card => addressZip</code> Postal code of the cardholder. The postal code size is between 5 and 9 characters in length and only contains numbers or letters. [max length: 9, min length: 3]
69
+ # * <code>card => addressZip</code> Postal code of the cardholder. The postal code size is between 5 and 9 characters in length and only contains numbers or letters. [max length: 32]
70
70
  # * <code>card => cvc</code> CVC security code of the card. This is the code on the back of the card. Example: 123
71
71
  # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12] <b>required </b>
72
72
  # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99] <b>required </b>
@@ -134,7 +134,7 @@ class Authorization < Hash
134
134
 
135
135
  # Retrieve Authorization objects.
136
136
  # criteria:: a hash of parameters; valid keys are:
137
- # * <code>filter</code> Filters to apply to the list.
137
+ # * <code>filter</code> <table class="filter_list"><tr><td>filter.id</td><td>Filter by the Authorization Id</td></tr><tr><td>filter.replayId</td><td>Filter by the compoundReplayId</td></tr><tr><td>filter.last4</td><td>Filter by the card number (last 4 digits)</td></tr><tr><td>filter.amount</td><td>Filter by the transaction amount (in the smallest unit of your currency)</td></tr><tr><td>filter.text</td><td>Filter by the description of the authorization</td></tr><tr><td>filter.amountMin & filter.amountMax</td><td>The filter amountMin must be used with amountMax to find authorizations with authorization values between the min and max</td></tr><tr><td>filter.dateCreatedMin<sup>*</sup></td><td>Filter by the minimum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.dateCreatedMax<sup>*</sup></td><td>Filter by the maximum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.deposit</td><td>Filter by the deposit id</td></tr><tr><td>filter.customer</td><td>Filter using the Id of the customer to find the authorizations for that customer</td></tr><tr><td>filter.status</td><td>Filter by the authorization status text</td></tr><tr><td>filter.authCode</td><td>Filter by the authorization code (Not the authorization ID)</td></tr><tr><td>filter.q</td><td>You can use this to filter by the ID, the authCode or the amount of the authorization</td></tr></table><br><sup>*</sup>Use dateCreatedMin with dateCreatedMax in the same filter if you want to search between two created dates
138
138
  # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
139
139
  # * <code>offset</code> Used in pagination of the list. This is the start offset of the page. [min value: 0, default: 0]
140
140
  # * <code>sorting</code> Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> dateCreated</code><code> amount</code><code> id</code><code> description</code><code> paymentDate</code>.
@@ -66,7 +66,7 @@ class CardToken < Hash
66
66
  # * <code>card => addressLine1</code> Address of the cardholder. [max length: 255]
67
67
  # * <code>card => addressLine2</code> Address of the cardholder if needed. [max length: 255]
68
68
  # * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. [max length: 255]
69
- # * <code>card => addressZip</code> Postal code of the cardholder. The postal code size is between 5 and 9 in length and only contain numbers or letters. [max length: 9, min length: 3]
69
+ # * <code>card => addressZip</code> Postal code of the cardholder. The postal code size is between 5 and 9 in length and only contain numbers or letters. [max length: 32]
70
70
  # * <code>card => cvc</code> CVC security code of the card. This is the code on the back of the card. Example: 123
71
71
  # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12] <b>required </b>
72
72
  # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99] <b>required </b>
@@ -59,7 +59,7 @@ class Chargeback < Hash
59
59
 
60
60
  # Retrieve Chargeback objects.
61
61
  # criteria:: a hash of parameters; valid keys are:
62
- # * <code>filter</code> Filters to apply to the list.
62
+ # * <code>filter</code> <table class="filter_list"><tr><td>filter.text</td><td>Filter by the description of the chargeback </td></tr><tr><td>filter.id</td><td>Filter by the chargeback Id</td></tr><tr><td>filter.amount</td><td>Filter by the chargeback amount (in the smallest unit of your currency)</td></tr><tr><td>filter.dateCreatedMin<sup>*</sup></td><td>Filter by the minimum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.dateCreatedMax<sup>*</sup></td><td>Filter by the maximum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.chargebackDateMin<sup>*</sup></td><td>Filter by the earliest chargeback date you are searching for - Date in UTC millis</td></tr><tr><td>filter.chargebackDateMax<sup>*</sup></td><td>Filter by the latest chargeback date you are searching for - Date in UTC millis</td></tr><tr><td>filter.deposit</td><td>Filter by the deposit id</td></tr><tr><td>filter.q</td><td>You can use this to filter by the Id, the payment card's last 4 digits or the chargeback amount</td></tr></table><br><sup>*</sup>Use dateCreatedMin with dateCreatedMax (or chargebackDateMin and chargebackDateMax) in the same filter if you want to search between two created dates
63
63
  # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
64
64
  # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
65
65
  # * <code>sorting</code> Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> id</code><code> amount</code><code> description</code><code> dateCreated</code>.
@@ -30,7 +30,7 @@ module Simplify
30
30
  # Constants.
31
31
  class Constants
32
32
 
33
- @@version = '1.6.0'
33
+ @@version = '1.7.0'
34
34
  @@api_base_live_url = 'https://api.simplify.com/v1/api'
35
35
  @@api_base_sandbox_url = 'https://sandbox.simplify.com/v1/api'
36
36
  @@oauth_base_url = 'https://www.simplify.com/commerce/oauth';
@@ -90,7 +90,7 @@ class Coupon < Hash
90
90
 
91
91
  # Retrieve Coupon objects.
92
92
  # criteria:: a hash of parameters; valid keys are:
93
- # * <code>filter</code> Filters to apply to the list.
93
+ # * <code>filter</code> <table class="filter_list"><tr><td>filter.id</td><td>Filter by the coupon Id</td></tr><tr><td>filter.text</td><td>Filter by the coupon code</td></tr><tr><td>filter.dateCreatedMin<sup>*</sup></td><td>Filter by the minimum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.dateCreatedMax<sup>*</sup></td><td>Filter by the maximum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.startDateMin</td><td>Filter by the minimum coupon start date you are searching for - Date in UTC millis</td></tr><tr><td>filter.startDateMax</td><td>Filter by the maximum coupon start date you are searching for - Date in UTC millis</td></tr><tr><td>filter.endDateMin</td><td>Filter by the minimum coupon end date you are searching for - Date in UTC millis</td></tr><tr><td>filter.endDateMax</td><td>Filter by the maximum coupon end date you are searching for - Date in UTC millis</td></tr></table><br><sup>*</sup>Use dateCreatedMin with dateCreatedMax in the same filter if you want to search between two created dates
94
94
  # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
95
95
  # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
96
96
  # * <code>sorting</code> Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> dateCreated</code><code> maxRedemptions</code><code> timesRedeemed</code><code> id</code><code> startDate</code><code> endDate</code><code> percentOff</code><code> couponCode</code><code> durationInMonths</code><code> numTimesApplied</code><code> amountOff</code>.
@@ -109,7 +109,7 @@ class Customer < Hash
109
109
 
110
110
  # Retrieve Customer objects.
111
111
  # criteria:: a hash of parameters; valid keys are:
112
- # * <code>filter</code> Filters to apply to the list.
112
+ # * <code>filter</code> <table class="filter_list"><tr><td>filter.id</td><td>Filter by the customer Id</td></tr><tr><td>filter.text</td><td>Can use this to filter by the name, email or reference for the customer</td></tr><tr><td>filter.dateCreatedMin<sup>*</sup></td><td>Filter by the minimum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.dateCreatedMax<sup>*</sup></td><td>Filter by the maximum created date you are searching for - Date in UTC millis</td></tr></table><br><sup>*</sup>Use dateCreatedMin with dateCreatedMax in the same filter if you want to search between two created dates
113
113
  # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
114
114
  # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
115
115
  # * <code>sorting</code> Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> dateCreated</code><code> id</code><code> name</code><code> email</code><code> reference</code>.
@@ -59,7 +59,7 @@ class Deposit < Hash
59
59
 
60
60
  # Retrieve Deposit objects.
61
61
  # criteria:: a hash of parameters; valid keys are:
62
- # * <code>filter</code> Filters to apply to the list.
62
+ # * <code>filter</code> <table class="filter_list"><tr><td>filter.id</td><td>Filter by the deposit Id</td></tr><tr><td>filter.amount</td><td>Filter by the deposit amount (in the smallest unit of your currency)</td></tr><tr><td>filter.dateCreatedMin<sup>*</sup></td><td>Filter by the minimum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.dateCreatedMax<sup>*</sup></td><td>Filter by the maximum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.depositDateMin</td><td>Filter by the earliest deposit date you are searching for - Date in UTC millis</td></tr><tr><td>filter.depositDateMax</td><td>Filter by the latest deposit date you are searching for - Date in UTC millis</td></tr><tr><td>filter.creditCount</td><td>Filter by the creditCount figure for the deposit</td></tr><tr><td>filter.creditAmount</td><td>Filter by the creditAmount figure for the deposit</td></tr><tr><td>filter.debitCount</td><td>Filter by the debitCount figure for the deposit</td></tr><tr><td>filter.debitAmount</td><td>Filter by the debitAmount figure for the deposit</td></tr><tr><td>filter.netCount</td><td>Filter by the netCount figure for the deposit</td></tr><tr><td>filter.netAmount</td><td>Filter by the netAmount figure for the deposit</td></tr><tr><td>filter.q</td><td>You can use this to filter by different figures or strings - can be the Id, creditAmount or the debitAmount for the deposit</td></tr></table><br><sup>*</sup>Use dateCreatedMin with dateCreatedMax in the same filter if you want to search between two created dates
63
63
  # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
64
64
  # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
65
65
  # * <code>sorting</code> Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> amount</code><code> dateCreated</code><code> depositDate</code>.
@@ -66,7 +66,7 @@ class FraudCheck < Hash
66
66
  # * <code>card => addressLine1</code> Address of the cardholder. [max length: 255]
67
67
  # * <code>card => addressLine2</code> Address of the cardholder if needed. [max length: 255]
68
68
  # * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. [max length: 255]
69
- # * <code>card => addressZip</code> Postal code of the cardholder. The postal code size is between 5 and 9 characters in length and only contains numbers or letters. [max length: 9, min length: 3]
69
+ # * <code>card => addressZip</code> Postal code of the cardholder. The postal code size is between 5 and 9 characters in length and only contains numbers or letters. [max length: 32]
70
70
  # * <code>card => cvc</code> CVC security code of the card. This is the code on the back of the card. Example: 123
71
71
  # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12] <b>required </b>
72
72
  # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99] <b>required </b>
@@ -92,10 +92,10 @@ class FraudCheck < Hash
92
92
 
93
93
  # Retrieve FraudCheck objects.
94
94
  # criteria:: a hash of parameters; valid keys are:
95
- # * <code>filter</code> Allows for ascending or descending sorting of the list.
95
+ # * <code>filter</code> Filters to apply to the list.
96
96
  # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
97
97
  # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
98
- # * <code>sorting</code> Used in paging of the list. This is the start offset of the page. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> amount</code><code> dateCreated</code><code> fraudResult</code>.
98
+ # * <code>sorting</code> Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> amount</code><code> dateCreated</code><code> fraudResult</code>.
99
99
  # auth:: Authentication information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. For backwards compatibility the public and private keys may be passed instead of the authentication object.
100
100
  # Returns an object where the <code>list</code> property contains the list of FraudCheck objects and the <code>total</code>
101
101
  # property contains the total number of FraudCheck objects available for the given criteria.
@@ -129,9 +129,9 @@ class FraudCheck < Hash
129
129
  #
130
130
  # The properties that can be updated:
131
131
  # * <code>integratorAuthCode</code> Authorization code for the transaction. [max length: 255]
132
- # * <code>integratorAvsAddress</code> AVS address response. [max length: 255]
133
- # * <code>integratorAvsZip</code> AVS zip response. [max length: 255]
134
- # * <code>integratorCvc</code> CVC response. [max length: 255]
132
+ # * <code>integratorAvsAddressResponse</code> AVS address response. [max length: 255]
133
+ # * <code>integratorAvsZipResponse</code> AVS zip response. [max length: 255]
134
+ # * <code>integratorCvcResponse</code> CVC response. [max length: 255]
135
135
  # * <code>integratorDeclineReason</code> Reason for the decline if applicable. [max length: 255]
136
136
  # * <code>integratorTransactionRef</code> Reference id for the transaction. [max length: 255] <b>(required)</b>
137
137
  # * <code>integratorTransactionStatus</code> Status of the transaction, valid values are "APPROVED", "DECLINED", "SETTLED", "REFUNDED" or "VOIDED".
@@ -125,7 +125,7 @@ class Invoice < Hash
125
125
 
126
126
  # Retrieve Invoice objects.
127
127
  # criteria:: a hash of parameters; valid keys are:
128
- # * <code>filter</code> Filters to apply to the list.
128
+ # * <code>filter</code> <table class="filter_list"><tr><td>filter.id</td><td>Filter by the invoice Id</td></tr><tr><td>filter.amount</td><td>Filter by the invoice amount (in the smallest unit of your currency)</td></tr><tr><td>filter.text</td><td>Filter by the name of the invoice</td></tr><tr><td>filter.dateCreatedMin<sup>*</sup></td><td>Filter by the minimum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.dateCreatedMax<sup>*</sup></td><td>Filter by the maximum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.datePaidMin<sup>*</sup></td><td>Filter by the minimum invoice paid date you are searching for - Date in UTC millis</td></tr><tr><td>filter.datePaidMax<sup>*</sup></td><td>Filter by the maximum invoice paid date you are searching for - Date in UTC millis</td></tr><tr><td>filter.status</td><td>Filter by the status of the invoice</td></tr><tr><td>filter.statuses</td><td>Filter by multiple statuses of different invoices</td></tr><tr><td>filter.customer</td><td>Filter using the Id of the customer linked to the invoice</td></tr><tr><td>filter.type</td><td>Filter by the invoice type</td></tr><tr><td>filter.types</td><td>Filter by multiple invoice types</td></tr><tr><td>filter.invoiceId</td><td>Filter by the user defined invoice id</td></tr><tr><td>filter.reference</td><td>Filter by the invoice reference text</td></tr></table><br><sup>*</sup>The filters datePaidMin and datePaidMax can be used in the same filter if you want to search between the two dates. The same is for dateCreatedMin/dateCreatedMax.
129
129
  # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
130
130
  # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
131
131
  # * <code>sorting</code> Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> id</code><code> invoiceDate</code><code> dueDate</code><code> datePaid</code><code> customer</code><code> status</code><code> dateCreated</code>.
@@ -67,7 +67,7 @@ class Payment < Hash
67
67
  # * <code>card => addressLine1</code> Address of the cardholder. [max length: 255]
68
68
  # * <code>card => addressLine2</code> Address of the cardholder if needed. [max length: 255]
69
69
  # * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. [max length: 255]
70
- # * <code>card => addressZip</code> Postal code of the cardholder. The postal code size is between 5 and 9 in length and only contain numbers or letters. [max length: 9, min length: 3]
70
+ # * <code>card => addressZip</code> Postal code of the cardholder. The postal code size is between 5 and 9 in length and only contain numbers or letters. [max length: 32]
71
71
  # * <code>card => cvc</code> CVC security code of the card. This is the code on the back of the card. Example: 123
72
72
  # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12] <b>required </b>
73
73
  # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99] <b>required </b>
@@ -130,7 +130,7 @@ class Payment < Hash
130
130
 
131
131
  # Retrieve Payment objects.
132
132
  # criteria:: a hash of parameters; valid keys are:
133
- # * <code>filter</code> Filters to apply to the list.
133
+ # * <code>filter</code> <table class="filter_list"><tr><td>filter.id</td><td>Filter by the payment Id</td></tr><tr><td>filter.replayId</td><td>Filter by the compoundReplayId</td></tr><tr><td>filter.last4</td><td>Filter by the card number (last 4 digits)</td></tr><tr><td>filter.amount</td><td>Filter by the payment amount (in the smallest unit of your currency)</td></tr><tr><td>filter.text</td><td>Filter by the description of the payment</td></tr><tr><td>filter.amountMin & filter.amountMax</td><td>The filter amountMin must be used with amountMax to find payments with payments amounts between the min and max figures</td></tr><tr><td>filter.dateCreatedMin<sup>*</sup></td><td>Filter by the minimum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.dateCreatedMax<sup>*</sup></td><td>Filter by the maximum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.deposit</td><td>Filter by the deposit id connected to the payment</td></tr><tr><td>filter.customer</td><td>Filter using the Id of the customer to find the payments for that customer</td></tr><tr><td>filter.status</td><td>Filter by the payment status text</td></tr><tr><td>filter.reference</td><td>Filter by the payment reference text</td></tr><tr><td>filter.authCode</td><td>Filter by the payment authorization code (Not the authorization ID)</td></tr><tr><td>filter.q</td><td>You can use this to filter by the Id, the authCode or the amount of the payment</td></tr></table><br><sup>*</sup>Use dateCreatedMin with dateCreatedMax in the same filter if you want to search between two created dates
134
134
  # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
135
135
  # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
136
136
  # * <code>sorting</code> Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> dateCreated</code><code> createdBy</code><code> amount</code><code> id</code><code> description</code><code> paymentDate</code>.
@@ -44,6 +44,8 @@ module Simplify
44
44
  @@api_base_sandbox_url = Constants::api_base_sandbox_url
45
45
  @@oauth_base_url = Constants::oauth_base_url
46
46
  @@user_agent = nil
47
+ @@request_timeout = nil
48
+ @@request_options = nil
47
49
 
48
50
 
49
51
  # Returns the value of the public API key.
@@ -106,6 +108,26 @@ module Simplify
106
108
  @@user_agent = ua
107
109
  end
108
110
 
111
+ # Returns the timeout in seconds for API requests.
112
+ def self.request_timeout
113
+ @@request_timeout
114
+ end
115
+
116
+ # Sets the timeout in seconds for API requests.
117
+ def self.request_timeout=(s)
118
+ @@request_timeout = s
119
+ end
120
+
121
+ #:nodoc:
122
+ def self.request_options
123
+ @@request_options
124
+ end
125
+
126
+ #:nodoc:
127
+ def self.request_options=(o)
128
+ @@request_options = o
129
+ end
130
+
109
131
 
110
132
  class PaymentsApi
111
133
 
@@ -222,11 +244,20 @@ module Simplify
222
244
  }.merge(opts[:headers] || {})
223
245
  })
224
246
 
247
+ if Simplify::request_timeout != nil
248
+ opts[:timeout] = Simplify::request_timeout
249
+ end
250
+
251
+ if Simplify::request_options != nil
252
+ opts.merge!(Simplify::request_options)
253
+ end
254
+
225
255
  begin
226
256
  response = RestClient::Request.execute(opts)
227
257
  JSON.parse(response.body)
258
+ rescue RestClient::RequestTimeout => e
259
+ raise ApiException.new("request timeout", nil, nil)
228
260
  rescue RestClient::Exception => e
229
-
230
261
  begin
231
262
  errorData = JSON.parse(e.response.body)
232
263
  rescue JSON::ParserError => e2
@@ -281,9 +312,19 @@ module Simplify
281
312
  }.merge(opts[:headers] || {})
282
313
  })
283
314
 
315
+ if Simplify::request_timeout != nil
316
+ opts[:timeout] = Simplify::request_timeout
317
+ end
318
+
319
+ if Simplify::request_options != nil
320
+ opts.merge!(Simplify::request_options)
321
+ end
322
+
284
323
  begin
285
324
  response = RestClient::Request.execute(opts)
286
325
  JSON.parse(response.body)
326
+ rescue RestClient::RequestTimeout => e
327
+ raise ApiException.new("request timeout", nil, nil)
287
328
  rescue RestClient::Exception => e
288
329
 
289
330
  begin
@@ -91,7 +91,7 @@ class Plan < Hash
91
91
 
92
92
  # Retrieve Plan objects.
93
93
  # criteria:: a hash of parameters; valid keys are:
94
- # * <code>filter</code> Filters to apply to the list.
94
+ # * <code>filter</code> <table class="filter_list"><tr><td>filter.id</td><td>Filter by the plan Id</td></tr><tr><td>filter.text</td><td>Filter by the name of the plan</td></tr><tr><td>filter.frequency</td><td>Filter by the frequency of the plan</td></tr><tr><td>filter.amountMin & filter.amountMax</td><td>The filter amountMin must be used with amountMax to find plans with plan values between the min and max figures</td></tr><tr><td>filter.dateCreatedMin<sup>*</sup></td><td>Filter by the minimum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.dateCreatedMax<sup>*</sup></td><td>Filter by the maximum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.q</td><td>You can use this to filter by the Id, the name or the amount of the plan</td></tr></table><br><sup>*</sup>Use dateCreatedMin with dateCreatedMax in the same filter if you want to search between two created dates
95
95
  # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
96
96
  # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
97
97
  # * <code>sorting</code> Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> dateCreated</code><code> amount</code><code> frequency</code><code> name</code><code> id</code>.
@@ -81,7 +81,7 @@ class Refund < Hash
81
81
 
82
82
  # Retrieve Refund objects.
83
83
  # criteria:: a hash of parameters; valid keys are:
84
- # * <code>filter</code> Filters to apply to the list.
84
+ # * <code>filter</code> <table class="filter_list"><tr><td>filter.id</td><td>Filter by the refund Id</td></tr><tr><td>filter.text</td><td>Filter by the refund description text</td></tr><tr><td>filter.replayId</td><td>Filter by the compoundReplayId</td></tr><tr><td>filter.authCode</td><td>Filter by the authorization code (Not authorization ID)</td></tr><tr><td>filter.amount</td><td>Filter by the refund amount (in the smallest unit of your currency)</td></tr><tr><td>filter.dateCreatedMin<sup>*</sup></td><td>Filter by the minimum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.dateCreatedMax<sup>*</sup></td><td>Filter by the maximum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.deposit</td><td>Filter by the deposit id</td></tr><tr><td>filter.q</td><td>You can use this to filter by the Id, the authCode or the amount of the refund</td></tr></table><br><sup>*</sup>Use dateCreatedMin with dateCreatedMax in the same filter if you want to search between two created dates
85
85
  # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
86
86
  # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
87
87
  # * <code>sorting</code> Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> id</code><code> amount</code><code> description</code><code> dateCreated</code><code> paymentDate</code>.
@@ -93,10 +93,10 @@ class Subscription < Hash
93
93
 
94
94
  # Retrieve Subscription objects.
95
95
  # criteria:: a hash of parameters; valid keys are:
96
- # * <code>filter</code> Filters to apply to the list.
96
+ # * <code>filter</code> <table class="filter_list"><tr><td>filter.customer</td><td>Filter by the Id of the customer with the subscription</td></tr><tr><td>filter.plan</td><td>Filter by the Id of the plan linked to the subscription</td></tr><tr><td>filter.dateCreatedMin<sup>*</sup></td><td>Filter by the minimum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.dateCreatedMax<sup>*</sup></td><td>Filter by the maximum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.q</td><td>You can use this to filter by the Id, the name or the amount of the subscription</td></tr></table><br><sup>*</sup>Use dateCreatedMin with dateCreatedMax in the same filter if you want to search between two created dates
97
97
  # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
98
98
  # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
99
- # * <code>sorting</code> Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> id</code><code> plan</code>.
99
+ # * <code>sorting</code> Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> dateCreated</code><code> id</code><code> plan</code>.
100
100
  # auth:: Authentication information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. For backwards compatibility the public and private keys may be passed instead of the authentication object.
101
101
  # Returns an object where the <code>list</code> property contains the list of Subscription objects and the <code>total</code>
102
102
  # property contains the total number of Subscription objects available for the given criteria.
@@ -83,7 +83,7 @@ class Tax < Hash
83
83
 
84
84
  # Retrieve Tax objects.
85
85
  # criteria:: a hash of parameters; valid keys are:
86
- # * <code>filter</code> Filters to apply to the list.
86
+ # * <code>filter</code> <table class="filter_list"><tr><td>filter.id</td><td>Filter by the Id of the tax</td></tr><tr><td>filter.label</td><td>Filter by the label(name) of the tax</td></tr></table>
87
87
  # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
88
88
  # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
89
89
  # * <code>sorting</code> Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> id</code><code> label</code>.
@@ -81,10 +81,10 @@ class TransactionReview < Hash
81
81
 
82
82
  # Retrieve TransactionReview objects.
83
83
  # criteria:: a hash of parameters; valid keys are:
84
- # * <code>filter</code> Allows for ascending or descending sorting of the list.
84
+ # * <code>filter</code> <table class="filter_list"><tr><td>filter.id</td><td>Filter by the Id of the transaction review</td></tr><tr><td>filter.label</td><td>Filter by the status of the transaction review</td></tr></table>
85
85
  # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
86
- # * <code>offset</code> Filters to apply to the list. [min value: 0, default: 0]
87
- # * <code>sorting</code> Used in paging of the list. This is the start offset of the page. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> dateCreated</code><code> status</code>.
86
+ # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
87
+ # * <code>sorting</code> Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> dateCreated</code><code> status</code>.
88
88
  # auth:: Authentication information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. For backwards compatibility the public and private keys may be passed instead of the authentication object.
89
89
  # Returns an object where the <code>list</code> property contains the list of TransactionReview objects and the <code>total</code>
90
90
  # property contains the total number of TransactionReview objects available for the given criteria.
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplify
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simplify Commerce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-07 00:00:00.000000000 Z
11
+ date: 2016-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: ruby-hmac
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: Ruby access to the Simplify Commerce API
@@ -92,17 +92,17 @@ require_paths:
92
92
  - lib
93
93
  required_ruby_version: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - ">="
95
+ - - ! '>='
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - ">="
100
+ - - ! '>='
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  requirements: []
104
104
  rubyforge_project:
105
- rubygems_version: 2.5.1
105
+ rubygems_version: 2.4.8
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: Simplify Commerce Ruby SDK