simplify 1.3.0 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 84713c08a5adba068524df19e62b2b38bd74c768
4
- data.tar.gz: e2af191c5d328304a12fcb429deabd8a615286b4
2
+ SHA256:
3
+ metadata.gz: 255ec1cb67dd38ecb3f212a1dd680be5fc3ff92d80800ee0214377ce09560c78
4
+ data.tar.gz: 7b5fec623a660eb373d0f4816029b2b09d19d8c07d7e08d19096f4875efc8695
5
5
  SHA512:
6
- metadata.gz: 1f9939403ac4b2e932809f818e1d66f35a86b429158a760ede50fbe445a909631aae80e9954e3de9cfa1f0ec447b7eaa81fffec44c8e105f5ff6b18ac2c4265f
7
- data.tar.gz: 3bbc4bf783728f91500d17242aa6242adce26f70332f9b1f602c05f4d4c0406a0298ef7b150103d1716dab7e9e5fde572a111f7da438ed585eecb132388fa93c
6
+ metadata.gz: 248269fa2bf3947e07aac49b71e1361b291d1ad26f8eca6d8817efbbec482fde6314af03f63730570df635e87889d37f439306cd2bd9cd6cef2e6d1a5aa53826
7
+ data.tar.gz: 79a4379bf2276bd07e85c9f5585d856934d7a1cfc1fca07df0deeab4b7d456c71bbc27c99fd91b7880e67d9dfcda9ead60cf94224030b4e005279ab4ec3bee1d
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -60,21 +60,54 @@ class Authorization < Hash
60
60
  # Creates an Authorization object
61
61
  #
62
62
  # parms:: a hash of parameters; valid keys are:
63
- # * <code>amount</code> Amount of the payment (in the smallest unit of your currency). Example: 100 = $1.00USD <b>required </b>
63
+ # * <code>amount</code> Amount of the payment (in the smallest unit of your currency). Example: 100 = $1.00 <b>required </b>
64
64
  # * <code>card => addressCity</code> City of the cardholder. [max length: 50, min length: 2]
65
65
  # * <code>card => addressCountry</code> Country code (ISO-3166-1-alpha-2 code) of residence of the cardholder. [max length: 2, min length: 2]
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
- # * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. [max length: 255, min length: 2]
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]
68
+ # * <code>card => addressState</code> State of residence of the cardholder. State abbreviations should be used. [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: 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
- # * <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
- # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99] <b>required </b>
71
+ # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12]
72
+ # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99]
73
73
  # * <code>card => name</code> Name as it appears on the card. [max length: 50, min length: 2]
74
- # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13] <b>required </b>
74
+ # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13]
75
75
  # * <code>currency</code> Currency code (ISO-4217) for the transaction. Must match the currency associated with your account. [default: USD] <b>required </b>
76
76
  # * <code>customer</code> ID of customer. If specified, card on file of customer will be used.
77
77
  # * <code>description</code> Free form text field to be used as a description of the payment. This field is echoed back with the payment on any find or list operations. [max length: 1024]
78
+ # * <code>order => commodityCode</code> Standard classification code for products and services. [max length: 5]
79
+ # * <code>order => customer</code> ID of the customer associated with the order.
80
+ # * <code>order => customerEmail</code> Customer email address.
81
+ # * <code>order => customerName</code> Customer name.
82
+ # * <code>order => customerNote</code> Additional notes provided by the customer. [max length: 255]
83
+ # * <code>order => customerReference</code> A merchant reference for the customer.
84
+ # * <code>order => items => amount</code> Cost of the item.
85
+ # * <code>order => items => description</code> Description of the item.
86
+ # * <code>order => items => name</code> Item name.
87
+ # * <code>order => items => product</code> Product information associated with the item.
88
+ # * <code>order => items => quantity</code> Quantity of the item contained in the order [min value: 1, max value: 999999, default: 1] <b>required </b>
89
+ # * <code>order => items => reference</code> A merchant reference for the item. [max length: 255]
90
+ # * <code>order => items => tax</code> Taxes associated with the item.
91
+ # * <code>order => merchantNote</code> Additional notes provided by the merchant. [max length: 255]
92
+ # * <code>order => payment</code> ID of the payment associated with the order.
93
+ # * <code>order => reference</code> A merchant reference for the order. [max length: 255]
94
+ # * <code>order => shippingAddress => city</code> City, town, or municipality. [max length: 255, min length: 2]
95
+ # * <code>order => shippingAddress => country</code> 2-character country code. [max length: 2, min length: 2]
96
+ # * <code>order => shippingAddress => line1</code> Street address. [max length: 255]
97
+ # * <code>order => shippingAddress => line2</code> (Opt) Street address continued. [max length: 255]
98
+ # * <code>order => shippingAddress => name</code> Name of the entity being shipped to. [max length: 255]
99
+ # * <code>order => shippingAddress => state</code> State or province. [max length: 255]
100
+ # * <code>order => shippingAddress => zip</code> Postal code. [max length: 32]
101
+ # * <code>order => shippingFromAddress => city</code> City, town, or municipality. [max length: 255, min length: 2]
102
+ # * <code>order => shippingFromAddress => country</code> 2-character country code. [max length: 2, min length: 2]
103
+ # * <code>order => shippingFromAddress => line1</code> Street address. [max length: 255]
104
+ # * <code>order => shippingFromAddress => line2</code> (Opt) Street address continued. [max length: 255]
105
+ # * <code>order => shippingFromAddress => name</code> Name of the entity performing the shipping. [max length: 255]
106
+ # * <code>order => shippingFromAddress => state</code> State or province. [max length: 255]
107
+ # * <code>order => shippingFromAddress => zip</code> Postal code. [max length: 32]
108
+ # * <code>order => shippingName</code> Name of the entity being shipped to.
109
+ # * <code>order => source</code> Order source. [default: WEB] <b>required </b>
110
+ # * <code>order => status</code> Status of the order. [default: INCOMPLETE] <b>required </b>
78
111
  # * <code>reference</code> Custom reference field to be used with outside systems.
79
112
  # * <code>replayId</code> An identifier that can be sent to uniquely identify a payment request to facilitate retries due to I/O related issues. This identifier must be unique for your account (sandbox or live) across all of your payments. If supplied, we will check for a payment on your account that matches this identifier, and if one is found we will attempt to return an identical response of the original request. [max length: 50, min length: 1]
80
113
  # * <code>statementDescription => name</code> Merchant name <b>required </b>
@@ -101,7 +134,7 @@ class Authorization < Hash
101
134
 
102
135
  # Retrieve Authorization objects.
103
136
  # criteria:: a hash of parameters; valid keys are:
104
- # * <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
105
138
  # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
106
139
  # * <code>offset</code> Used in pagination of the list. This is the start offset of the page. [min value: 0, default: 0]
107
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>.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -60,19 +60,26 @@ class CardToken < Hash
60
60
  # Creates an CardToken object
61
61
  #
62
62
  # parms:: a hash of parameters; valid keys are:
63
+ # * <code>authenticatePayer</code> Set as true to create CardToken for EMV 3DS transaction. [default: false]
63
64
  # * <code>callback</code> The URL callback for the cardtoken
64
65
  # * <code>card => addressCity</code> City of the cardholder. [max length: 50, min length: 2]
65
66
  # * <code>card => addressCountry</code> Country code (ISO-3166-1-alpha-2 code) of residence of the cardholder. [max length: 2, min length: 2]
66
67
  # * <code>card => addressLine1</code> Address of the cardholder. [max length: 255]
67
68
  # * <code>card => addressLine2</code> Address of the cardholder if needed. [max length: 255]
68
- # * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. [max length: 255, min length: 2]
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 => addressState</code> State of residence of the cardholder. State abbreviations should be used. [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: 32]
70
71
  # * <code>card => cvc</code> CVC security code of the card. This is the code on the back of the card. Example: 123
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
- # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99] <b>required </b>
72
+ # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12]
73
+ # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99]
73
74
  # * <code>card => name</code> Name as appears on the card. [max length: 50, min length: 2]
74
- # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13] <b>required </b>
75
+ # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13]
75
76
  # * <code>key</code> Key used to create the card token.
77
+ # * <code>secure3DRequestData => amount</code> Amount of the subsequent transaction in the smallest unit of your currency. Example: 100 = $1.00 <b>required </b>
78
+ # * <code>secure3DRequestData => authOnly</code> Specifies if the subsequent transaction is going to be a Payment or an Authorization (to be Captured later). If false or not specified, it refers to a Payment, otherwise it refers to an Authorization.
79
+ # * <code>secure3DRequestData => currency</code> Currency code (ISO-4217). Must match the currency associated with your account. <b>required </b>
80
+ # * <code>secure3DRequestData => description</code> A description of the transaction. [max length: 256]
81
+ # * <code>secure3DRequestData => id</code> 3D Secure data ID.
82
+ # * <code>source</code> Card Token Source [default: API]
76
83
  # 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.
77
84
  # Returns a CardToken object.
78
85
  def self.create(parms, *auth)
@@ -100,5 +107,21 @@ class CardToken < Hash
100
107
  obj
101
108
  end
102
109
 
110
+ # Updates this object
111
+ #
112
+ # The properties that can be updated:
113
+ # * <code>device => browser</code> The User-Agent header of the browser the customer used to place the order <b>(required)</b>
114
+ # * <code>device => ipAddress</code> The IP address of the device used by the payer, in nnn.nnn.nnn.nnn format. <b>(required)</b>
115
+ # * <code>device => language</code> The language supported for the payer's browser as defined in IETF BCP47.
116
+ # * <code>device => screenHeight</code> The total height of the payer's browser screen in pixels.
117
+ # * <code>device => screenWidth</code> The total width of the payer's browser screen in pixels.
118
+ # * <code>device => timeZone</code> The timezone of the device used by the payer, in Zone ID format. Example: "Europe/Dublin" <b>(required)</b>
119
+ # * <code>key</code> The public key of the merchant to be used for the token
120
+ def update()
121
+ h = Simplify::PaymentsApi.execute("cardToken", 'update', self, self.authentication)
122
+ self.merge!(h)
123
+ self
124
+ end
125
+
103
126
  end
104
127
  end
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -30,7 +30,7 @@ module Simplify
30
30
  # Constants.
31
31
  class Constants
32
32
 
33
- @@version = '1.3.0'
33
+ @@version = '1.8.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';
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -60,7 +60,7 @@ class Coupon < Hash
60
60
  # Creates an Coupon object
61
61
  #
62
62
  # parms:: a hash of parameters; valid keys are:
63
- # * <code>amountOff</code> Amount off of the price of the product in the smallest units of the currency of the merchant. While this field is optional, you must provide either amountOff or percentOff for a coupon. Example: 100 = $1.00USD [min value: 1]
63
+ # * <code>amountOff</code> Amount off of the price of the product in the smallest units of the currency of the merchant. While this field is optional, you must provide either amountOff or percentOff for a coupon. Example: 100 = $1.00 [min value: 1]
64
64
  # * <code>couponCode</code> Code that identifies the coupon to be used. [min length: 2] <b>required </b>
65
65
  # * <code>description</code> A brief section that describes the coupon.
66
66
  # * <code>durationInMonths</code> DEPRECATED - Duration in months that the coupon will be applied after it has first been selected. [min value: 1, max value: 9999]
@@ -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>.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -64,7 +64,7 @@ class Customer < Hash
64
64
  # * <code>card => addressCountry</code> Country code (ISO-3166-1-alpha-2 code) of residence of the cardholder. <b>required </b>
65
65
  # * <code>card => addressLine1</code> Address of the cardholder <b>required </b>
66
66
  # * <code>card => addressLine2</code> Address of the cardholder if needed. <b>required </b>
67
- # * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. <b>required </b>
67
+ # * <code>card => addressState</code> State of residence of the cardholder. State abbreviations should be used. <b>required </b>
68
68
  # * <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. <b>required </b>
69
69
  # * <code>card => cvc</code> CVC security code of the card. This is the code on the back of the card. Example: 123 <b>required </b>
70
70
  # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 <b>required </b>
@@ -73,20 +73,23 @@ class Customer < Hash
73
73
  # * <code>card => name</code> Name as appears on the card. <b>required </b>
74
74
  # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13]
75
75
  # * <code>email</code> Email address of the customer <b>required </b>
76
- # * <code>name</code> Customer name [min length: 2] <b>required </b>
76
+ # * <code>name</code> Customer name [max length: 50, min length: 2] <b>required </b>
77
77
  # * <code>reference</code> Reference field for external applications use.
78
- # * <code>subscriptions => amount</code> Amount of payment in the smallest unit of your currency. Example: 100 = $1.00USD
78
+ # * <code>subscriptions => amount</code> Amount of payment in the smallest unit of your currency. Example: 100 = $1.00
79
79
  # * <code>subscriptions => billingCycle</code> How the plan is billed to the customer. Values must be AUTO (indefinitely until the customer cancels) or FIXED (a fixed number of billing cycles). [default: AUTO]
80
80
  # * <code>subscriptions => billingCycleLimit</code> The number of fixed billing cycles for a plan. Only used if the billingCycle parameter is set to FIXED. Example: 4
81
81
  # * <code>subscriptions => coupon</code> Coupon associated with the subscription for the customer.
82
- # * <code>subscriptions => currency</code> Currency code (ISO-4217). Must match the currency associated with your account. [default: USD]
82
+ # * <code>subscriptions => currency</code> Currency code (ISO-4217). Must match the currency associated with your account.
83
+ # * <code>subscriptions => currentPeriodEnd</code> End date of subscription's current period
84
+ # * <code>subscriptions => currentPeriodStart</code> Start date of subscription's current period
83
85
  # * <code>subscriptions => customer</code> The customer ID to create the subscription for. Do not supply this when creating a customer.
84
86
  # * <code>subscriptions => frequency</code> Frequency of payment for the plan. Used in conjunction with frequencyPeriod. Valid values are "DAILY", "WEEKLY", "MONTHLY" and "YEARLY".
85
87
  # * <code>subscriptions => frequencyPeriod</code> Period of frequency of payment for the plan. Example: if the frequency is weekly, and periodFrequency is 2, then the subscription is billed bi-weekly.
86
- # * <code>subscriptions => name</code> Name describing subscription
88
+ # * <code>subscriptions => name</code> Name describing subscription [max length: 50]
87
89
  # * <code>subscriptions => plan</code> The plan ID that the subscription should be created from.
88
90
  # * <code>subscriptions => quantity</code> Quantity of the plan for the subscription. [min value: 1]
89
91
  # * <code>subscriptions => renewalReminderLeadDays</code> If set, how many days before the next billing cycle that a renewal reminder is sent to the customer. If null, then no emails are sent. Minimum value is 7 if set.
92
+ # * <code>subscriptions => source</code> Source of where subscription was created
90
93
  # * <code>token</code> If specified, card associated with card token will be used
91
94
  # 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.
92
95
  # Returns a Customer object.
@@ -109,7 +112,7 @@ class Customer < Hash
109
112
 
110
113
  # Retrieve Customer objects.
111
114
  # criteria:: a hash of parameters; valid keys are:
112
- # * <code>filter</code> Filters to apply to the list.
115
+ # * <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
116
  # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
114
117
  # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
115
118
  # * <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>.
@@ -149,7 +152,7 @@ class Customer < Hash
149
152
  # * <code>card => addressCountry</code> Country code (ISO-3166-1-alpha-2 code) of residence of the cardholder. <b>(required)</b>
150
153
  # * <code>card => addressLine1</code> Address of the cardholder. <b>(required)</b>
151
154
  # * <code>card => addressLine2</code> Address of the cardholder if needed. <b>(required)</b>
152
- # * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. <b>(required)</b>
155
+ # * <code>card => addressState</code> State of residence of the cardholder. State abbreviations should be used. <b>(required)</b>
153
156
  # * <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. <b>(required)</b>
154
157
  # * <code>card => cvc</code> CVC security code of the card. This is the code on the back of the card. Example: 123 <b>(required)</b>
155
158
  # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 <b>(required)</b>
@@ -158,7 +161,7 @@ class Customer < Hash
158
161
  # * <code>card => name</code> Name as appears on the card. <b>(required)</b>
159
162
  # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13]
160
163
  # * <code>email</code> Email address of the customer <b>(required)</b>
161
- # * <code>name</code> Customer name [min length: 2] <b>(required)</b>
164
+ # * <code>name</code> Customer name [max length: 50, min length: 2] <b>(required)</b>
162
165
  # * <code>reference</code> Reference field for external applications use.
163
166
  # * <code>token</code> If specified, card associated with card token will be added to the customer
164
167
  def update()
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -60,24 +60,24 @@ class FraudCheck < Hash
60
60
  # Creates an FraudCheck object
61
61
  #
62
62
  # parms:: a hash of parameters; valid keys are:
63
- # * <code>amount</code> Amount of the transaction to be checked for fraud (in the smallest unit of your currency). Example: 100 = $1.00USD. This field is required if using “full” or “advanced” mode.
63
+ # * <code>amount</code> Amount of the transaction to be checked for fraud (in the smallest unit of your currency). Example: 100 = $1.00. This field is required if using “full” or “advanced” mode.
64
64
  # * <code>card => addressCity</code> City of the cardholder. [max length: 50, min length: 2]
65
65
  # * <code>card => addressCountry</code> Country code (ISO-3166-1-alpha-2 code) of residence of the cardholder. [max length: 2, min length: 2]
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
- # * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. [max length: 255, min length: 2]
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]
68
+ # * <code>card => addressState</code> State of residence of the cardholder. State abbreviations should be used. [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: 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
- # * <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
- # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99] <b>required </b>
71
+ # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12]
72
+ # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99]
73
73
  # * <code>card => name</code> Name as it appears on the card. [max length: 50, min length: 2]
74
- # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13] <b>required </b>
74
+ # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13]
75
75
  # * <code>currency</code> Currency code (ISO-4217) for the transaction to be checked for fraud. This field is required if using “full” or “advanced” mode.
76
76
  # * <code>description</code> - Description of the fraud check. [max length: 255]
77
77
  # * <code>ipAddress</code> IP Address of the customer for which the fraud check is to be done. [max length: 45]
78
- # * <code>mode</code> Fraud check mode. “simple” only does an AVS and CVC check; “advanced” does a complete fraud check, running the input against the set up rules. [valid values: simple, advanced, full] <b>required </b>
78
+ # * <code>mode</code> Fraud check mode. “simple” only does an AVS and CVC check; “advanced” does a complete fraud check, running the input against the set up rules. [valid values: simple, advanced, full, SIMPLE, ADVANCED, FULL] <b>required </b>
79
79
  # * <code>sessionId</code> Session ID used during data collection. [max length: 255]
80
- # * <code>token</code> Card token token representing card details for the card to be checked. [max length: 255]
80
+ # * <code>token</code> Card token representing card details for the card to be checked. [max length: 255]
81
81
  # 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.
82
82
  # Returns a FraudCheck object.
83
83
  def self.create(parms, *auth)
@@ -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: .
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.
@@ -125,5 +125,21 @@ class FraudCheck < Hash
125
125
  obj
126
126
  end
127
127
 
128
+ # Updates this object
129
+ #
130
+ # The properties that can be updated:
131
+ # * <code>integratorAuthCode</code> Authorization code for the transaction. [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
+ # * <code>integratorDeclineReason</code> Reason for the decline if applicable. [max length: 255]
136
+ # * <code>integratorTransactionRef</code> Reference id for the transaction. [max length: 255] <b>(required)</b>
137
+ # * <code>integratorTransactionStatus</code> Status of the transaction, valid values are "APPROVED", "DECLINED", "SETTLED", "REFUNDED" or "VOIDED".
138
+ def update()
139
+ h = Simplify::PaymentsApi.execute("fraudCheck", 'update', self, self.authentication)
140
+ self.merge!(h)
141
+ self
142
+ end
143
+
128
144
  end
129
145
  end
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -74,22 +74,23 @@ class Invoice < Hash
74
74
  # * <code>businessAddress => name</code> The name of the business that is sending the invoice. [max length: 255]
75
75
  # * <code>businessAddress => state</code> Address state of the business that is sending the invoice. [max length: 255]
76
76
  # * <code>businessAddress => zip</code> Address zip of the business that is sending the invoice. [max length: 32]
77
- # * <code>currency</code> Currency code (ISO-4217). Must match the currency associated with your account. [max length: 3, min length: 3, default: USD]
77
+ # * <code>currency</code> Currency code (ISO-4217). Must match the currency associated with your account. [max length: 3, min length: 3]
78
78
  # * <code>customer</code> The customer ID of the customer we are invoicing. This is optional if invoiceToCopy or a name and email are provided
79
79
  # * <code>customerTaxNo</code> The tax number or VAT id of the person to whom the goods or services were supplied. [max length: 255]
80
80
  # * <code>discountRate</code> The discount percent as a decimal e.g. 12.5. This is used to calculate the discount amount which is subtracted from the total amount due before any tax is applied. [max length: 6]
81
81
  # * <code>dueDate</code> The date invoice payment is due. If a late fee is provided this will be added to the invoice total is the due date has past.
82
82
  # * <code>email</code> The email of the customer we are invoicing. This is optional if customer or invoiceToCopy is provided. A new customer will be created using the the name and email.
83
83
  # * <code>invoiceId</code> User defined invoice id. If not provided the system will generate a numeric id. [max length: 255]
84
+ # * <code>invoiceLanguage</code> The language in which invoice will be displayed. [max length: 5, min length: 5]
84
85
  # * <code>invoiceToCopy</code> The id of an existing invoice to be copied. This is optional if customer or a name and email are provided
85
- # * <code>items => amount</code> Amount of the invoice item (the smallest unit of your currency). Example: 100 = $1.00USD [min value: -9999900, max value: 9999900] <b>required </b>
86
+ # * <code>items => amount</code> Amount of the invoice item (the smallest unit of your currency). Example: 100 = $1.00 <b>required </b>
86
87
  # * <code>items => description</code> The description of the invoice item. [max length: 1024]
87
88
  # * <code>items => invoice</code> The ID of the invoice this item belongs to.
88
89
  # * <code>items => product</code> The product this invoice item refers to.
89
90
  # * <code>items => quantity</code> Quantity of the item. This total amount of the invoice item is the amount * quantity. [min value: 1, max value: 999999, default: 1]
90
91
  # * <code>items => reference</code> User defined reference field. [max length: 255]
91
92
  # * <code>items => tax</code> The tax ID of the tax charge in the invoice item.
92
- # * <code>lateFee</code> The late fee amount that will be added to the invoice total is the due date is past due. Value provided must be in the smallest unit of your currency. Example: 100 = $1.00USD [max value: 9999900]
93
+ # * <code>lateFee</code> The late fee amount that will be added to the invoice total is the due date is past due. Value provided must be in the smallest unit of your currency. Example: 100 = $1.00
93
94
  # * <code>memo</code> A memo that is displayed to the customer on the invoice payment screen. [max length: 4000]
94
95
  # * <code>name</code> The name of the customer we are invoicing. This is optional if customer or invoiceToCopy is provided. A new customer will be created using the the name and email. [max length: 50, min length: 2]
95
96
  # * <code>note</code> This field can be used to store a note that is not displayed to the customer. [max length: 4000]
@@ -125,7 +126,7 @@ class Invoice < Hash
125
126
 
126
127
  # Retrieve Invoice objects.
127
128
  # criteria:: a hash of parameters; valid keys are:
128
- # * <code>filter</code> Filters to apply to the list.
129
+ # * <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
130
  # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
130
131
  # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
131
132
  # * <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>.
@@ -182,19 +183,21 @@ class Invoice < Hash
182
183
  # * <code>dueDate</code> The date invoice payment is due. If a late fee is provided this will be added to the invoice total is the due date has past.
183
184
  # * <code>email</code> The email of the customer we are invoicing. This is optional if customer or invoiceToCopy is provided. A new customer will be created using the the name and email.
184
185
  # * <code>invoiceId</code> User defined invoice id. If not provided the system will generate a numeric id. [max length: 255]
185
- # * <code>items => amount</code> Amount of the invoice item in the smallest unit of your currency. Example: 100 = $1.00USD [min value: -9999900, max value: 9999900] <b>(required)</b>
186
+ # * <code>invoiceLanguage</code> The language in which invoice will be displayed. [max length: 5, min length: 5]
187
+ # * <code>items => amount</code> Amount of the invoice item in the smallest unit of your currency. Example: 100 = $1.00 <b>(required)</b>
186
188
  # * <code>items => description</code> The description of the invoice item. [max length: 1024]
187
189
  # * <code>items => invoice</code> The ID of the invoice this item belongs to.
188
190
  # * <code>items => product</code> The Id of the product this item refers to.
189
191
  # * <code>items => quantity</code> Quantity of the item. This total amount of the invoice item is the amount * quantity. [min value: 1, max value: 999999, default: 1]
190
192
  # * <code>items => reference</code> User defined reference field. [max length: 255]
191
193
  # * <code>items => tax</code> The tax ID of the tax charge in the invoice item.
192
- # * <code>lateFee</code> The late fee amount that will be added to the invoice total is the due date is past due. Value provided must be in the smallest unit of your currency. Example: 100 = $1.00USD [max value: 9999900]
194
+ # * <code>lateFee</code> The late fee amount that will be added to the invoice total is the due date is past due. Value provided must be in the smallest unit of your currency. Example: 100 = $1.00
193
195
  # * <code>memo</code> A memo that is displayed to the customer on the invoice payment screen. [max length: 4000]
194
196
  # * <code>name</code> The name of the customer we are invoicing. This is optional if customer or invoiceToCopy is provided. A new customer will be created using the the name and email. [max length: 50, min length: 2]
195
197
  # * <code>note</code> This field can be used to store a note that is not displayed to the customer. [max length: 4000]
196
198
  # * <code>payment</code> The ID of the payment. Use this ID to query the /payment API. [max length: 255]
197
199
  # * <code>reference</code> User defined reference field. [max length: 255]
200
+ # * <code>sendMail</code> Boolean flag. If true the invoice will be sent to the customer if the invoice is in an OPEN state. [default: false] <b>(required)</b>
198
201
  # * <code>shippingAddress => city</code> Address city of the location where the goods or services were supplied. [max length: 255, min length: 2]
199
202
  # * <code>shippingAddress => country</code> Address country of the location where the goods or services were supplied. [max length: 2, min length: 2]
200
203
  # * <code>shippingAddress => line1</code> Address line 1 of the location where the goods or services were supplied. [max length: 255]
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -60,7 +60,7 @@ class InvoiceItem < Hash
60
60
  # Creates an InvoiceItem object
61
61
  #
62
62
  # parms:: a hash of parameters; valid keys are:
63
- # * <code>amount</code> Amount of the invoice item in the smallest unit of your currency. Example: 100 = $1.00USD [min value: -9999900, max value: 9999900] <b>required </b>
63
+ # * <code>amount</code> Amount of the invoice item in the smallest unit of your currency. Example: 100 = $1.00 <b>required </b>
64
64
  # * <code>description</code> Individual items of an invoice [max length: 1024]
65
65
  # * <code>invoice</code> The ID of the invoice this item belongs to.
66
66
  # * <code>product</code> Product ID this item relates to.
@@ -104,7 +104,7 @@ class InvoiceItem < Hash
104
104
  # Updates this object
105
105
  #
106
106
  # The properties that can be updated:
107
- # * <code>amount</code> Amount of the invoice item in the smallest unit of your currency. Example: 100 = $1.00USD [min value: 1]
107
+ # * <code>amount</code> Amount of the invoice item in the smallest unit of your currency. Example: 100 = $1.00 [min value: 1]
108
108
  # * <code>description</code> Individual items of an invoice
109
109
  # * <code>quantity</code> Quantity of the item. This total amount of the invoice item is the amount * quantity. [min value: 1, max value: 999999]
110
110
  # * <code>reference</code> User defined reference field.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -60,27 +60,61 @@ class Payment < Hash
60
60
  # Creates an Payment object
61
61
  #
62
62
  # parms:: a hash of parameters; valid keys are:
63
- # * <code>amount</code> Amount of the payment (in the smallest unit of your currency). Example: 100 = $1.00USD
63
+ # * <code>amount</code> Amount of the payment (in the smallest unit of your currency). Example: 100 = $1.00
64
64
  # * <code>authorization</code> The ID of the authorization being used to capture the payment.
65
65
  # * <code>card => addressCity</code> City of the cardholder. [max length: 50, min length: 2]
66
66
  # * <code>card => addressCountry</code> Country code (ISO-3166-1-alpha-2 code) of residence of the cardholder. [max length: 2, min length: 2]
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
- # * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. [max length: 255, min length: 2]
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]
69
+ # * <code>card => addressState</code> State of residence of the cardholder. State abbreviations should be used. [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: 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
- # * <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
- # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99] <b>required </b>
72
+ # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12]
73
+ # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99]
74
74
  # * <code>card => name</code> Name as it appears on the card. [max length: 50, min length: 2]
75
- # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13] <b>required </b>
75
+ # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13]
76
76
  # * <code>currency</code> Currency code (ISO-4217) for the transaction. Must match the currency associated with your account. [default: USD] <b>required </b>
77
77
  # * <code>customer</code> ID of customer. If specified, card on file of customer will be used.
78
78
  # * <code>description</code> Free form text field to be used as a description of the payment. This field is echoed back with the payment on any find or list operations. [max length: 1024]
79
79
  # * <code>invoice</code> ID of invoice for which this payment is being made.
80
+ # * <code>order => commodityCode</code> Standard classification code for products and services. [max length: 5]
81
+ # * <code>order => customer</code> ID of the customer associated with the order.
82
+ # * <code>order => customerEmail</code> Customer email address.
83
+ # * <code>order => customerName</code> Customer name.
84
+ # * <code>order => customerNote</code> Additional notes provided by the customer. [max length: 255]
85
+ # * <code>order => customerReference</code> A merchant reference for the customer.
86
+ # * <code>order => items => amount</code> Cost of the item.
87
+ # * <code>order => items => description</code> Description of the item.
88
+ # * <code>order => items => name</code> Item name.
89
+ # * <code>order => items => product</code> Product information associated with the item.
90
+ # * <code>order => items => quantity</code> Quantity of the item contained in the order [min value: 1, max value: 999999, default: 1] <b>required </b>
91
+ # * <code>order => items => reference</code> A merchant reference for the item. [max length: 255]
92
+ # * <code>order => items => tax</code> Taxes associated with the item.
93
+ # * <code>order => merchantNote</code> Additional notes provided by the merchant. [max length: 255]
94
+ # * <code>order => payment</code> ID of the payment associated with the order.
95
+ # * <code>order => reference</code> A merchant reference for the order. [max length: 255]
96
+ # * <code>order => shippingAddress => city</code> City, town, or municipality. [max length: 255, min length: 2]
97
+ # * <code>order => shippingAddress => country</code> 2-character country code. [max length: 2, min length: 2]
98
+ # * <code>order => shippingAddress => line1</code> Street address. [max length: 255]
99
+ # * <code>order => shippingAddress => line2</code> (Opt) Street address continued. [max length: 255]
100
+ # * <code>order => shippingAddress => name</code> Name of the entity being shipped to. [max length: 255]
101
+ # * <code>order => shippingAddress => state</code> State or province. [max length: 255]
102
+ # * <code>order => shippingAddress => zip</code> Postal code. [max length: 32]
103
+ # * <code>order => shippingFromAddress => city</code> City, town, or municipality. [max length: 255, min length: 2]
104
+ # * <code>order => shippingFromAddress => country</code> 2-character country code. [max length: 2, min length: 2]
105
+ # * <code>order => shippingFromAddress => line1</code> Street address. [max length: 255]
106
+ # * <code>order => shippingFromAddress => line2</code> (Opt) Street address continued. [max length: 255]
107
+ # * <code>order => shippingFromAddress => name</code> Name of the entity performing the shipping. [max length: 255]
108
+ # * <code>order => shippingFromAddress => state</code> State or province. [max length: 255]
109
+ # * <code>order => shippingFromAddress => zip</code> Postal code. [max length: 32]
110
+ # * <code>order => shippingName</code> Name of the entity being shipped to.
111
+ # * <code>order => source</code> Order source. [default: WEB] <b>required </b>
112
+ # * <code>order => status</code> Status of the order. [default: INCOMPLETE] <b>required </b>
80
113
  # * <code>reference</code> Custom reference field to be used with outside systems.
81
114
  # * <code>replayId</code> An identifier that can be sent to uniquely identify a payment request to facilitate retries due to I/O related issues. This identifier must be unique for your account (sandbox or live) across all of your payments. If supplied, we will check for a payment on your account that matches this identifier. If found will attempt to return an identical response of the original request. [max length: 50, min length: 1]
82
115
  # * <code>statementDescription => name</code> Merchant name. <b>required </b>
83
116
  # * <code>statementDescription => phoneNumber</code> Merchant contact phone number.
117
+ # * <code>taxExempt</code> Specify true to indicate that the payment is tax-exempt.
84
118
  # * <code>token</code> If specified, card associated with card token will be used. [max length: 255]
85
119
  # 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.
86
120
  # Returns a Payment object.
@@ -96,7 +130,7 @@ class Payment < Hash
96
130
 
97
131
  # Retrieve Payment objects.
98
132
  # criteria:: a hash of parameters; valid keys are:
99
- # * <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
100
134
  # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
101
135
  # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
102
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>.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -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
data/lib/simplify/plan.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -60,7 +60,7 @@ class Plan < Hash
60
60
  # Creates an Plan object
61
61
  #
62
62
  # parms:: a hash of parameters; valid keys are:
63
- # * <code>amount</code> Amount of payment for the plan in the smallest unit of your currency. Example: 100 = $1.00USD <b>required </b>
63
+ # * <code>amount</code> Amount of payment for the plan in the smallest unit of your currency. Example: 100 = $1.00 <b>required </b>
64
64
  # * <code>billingCycle</code> How the plan is billed to the customer. Values must be AUTO (indefinitely until the customer cancels) or FIXED (a fixed number of billing cycles). [default: AUTO]
65
65
  # * <code>billingCycleLimit</code> The number of fixed billing cycles for a plan. Only used if the billingCycle parameter is set to FIXED. Example: 4
66
66
  # * <code>currency</code> Currency code (ISO-4217) for the plan. Must match the currency associated with your account. [default: USD] <b>required </b>
@@ -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>.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -60,8 +60,8 @@ class Refund < Hash
60
60
  # Creates an Refund object
61
61
  #
62
62
  # parms:: a hash of parameters; valid keys are:
63
- # * <code>amount</code> Amount of the refund in the smallest unit of your currency. Example: 100 = $1.00USD [min value: 1] <b>required </b>
64
- # * <code>payment</code> ID of the payment for the refund <b>required </b>
63
+ # * <code>amount</code> Amount of the refund in the smallest unit of your currency. Example: 100 = $1.00 <b>required </b>
64
+ # * <code>payment</code> ID of the payment for the refund
65
65
  # * <code>reason</code> Reason for the refund
66
66
  # * <code>reference</code> Custom reference field to be used with outside systems.
67
67
  # * <code>replayId</code> An identifier that can be sent to uniquely identify a refund request to facilitate retries due to I/O related issues. This identifier must be unique for your account (sandbox or live) across all of your refunds. If supplied, we will check for a refund on your account that matches this identifier. If found we will return an identical response to that of the original request. [max length: 50, min length: 1]
@@ -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>.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -60,18 +60,21 @@ class Subscription < Hash
60
60
  # Creates an Subscription object
61
61
  #
62
62
  # parms:: a hash of parameters; valid keys are:
63
- # * <code>amount</code> Amount of the payment in the smallest unit of your currency. Example: 100 = $1.00USD
63
+ # * <code>amount</code> Amount of the payment in the smallest unit of your currency. Example: 100 = $1.00
64
64
  # * <code>billingCycle</code> How the plan is billed to the customer. Values must be AUTO (indefinitely until the customer cancels) or FIXED (a fixed number of billing cycles). [default: AUTO]
65
65
  # * <code>billingCycleLimit</code> The number of fixed billing cycles for a plan. Only used if the billingCycle parameter is set to FIXED. Example: 4
66
66
  # * <code>coupon</code> Coupon ID associated with the subscription
67
- # * <code>currency</code> Currency code (ISO-4217). Must match the currency associated with your account. [default: USD]
67
+ # * <code>currency</code> Currency code (ISO-4217). Must match the currency associated with your account.
68
+ # * <code>currentPeriodEnd</code> End date of subscription's current period
69
+ # * <code>currentPeriodStart</code> Start date of subscription's current period
68
70
  # * <code>customer</code> Customer that is enrolling in the subscription.
69
71
  # * <code>frequency</code> Frequency of payment for the plan. Used in conjunction with frequencyPeriod. Valid values are "DAILY", "WEEKLY", "MONTHLY" and "YEARLY".
70
72
  # * <code>frequencyPeriod</code> Period of frequency of payment for the plan. Example: if the frequency is weekly, and periodFrequency is 2, then the subscription is billed bi-weekly.
71
- # * <code>name</code> Name describing subscription
73
+ # * <code>name</code> Name describing subscription [max length: 50]
72
74
  # * <code>plan</code> The ID of the plan that should be used for the subscription.
73
75
  # * <code>quantity</code> Quantity of the plan for the subscription. [min value: 1]
74
76
  # * <code>renewalReminderLeadDays</code> If set, how many days before the next billing cycle that a renewal reminder is sent to the customer. If null, then no emails are sent. Minimum value is 7 if set.
77
+ # * <code>source</code> Source of where subscription was created
75
78
  # 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.
76
79
  # Returns a Subscription object.
77
80
  def self.create(parms, *auth)
@@ -93,10 +96,10 @@ class Subscription < Hash
93
96
 
94
97
  # Retrieve Subscription objects.
95
98
  # criteria:: a hash of parameters; valid keys are:
96
- # * <code>filter</code> Filters to apply to the list.
99
+ # * <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
100
  # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
98
101
  # * <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>.
102
+ # * <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
103
  # 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
104
  # Returns an object where the <code>list</code> property contains the list of Subscription objects and the <code>total</code>
102
105
  # property contains the total number of Subscription objects available for the given criteria.
@@ -129,11 +132,13 @@ class Subscription < Hash
129
132
  # Updates this object
130
133
  #
131
134
  # The properties that can be updated:
132
- # * <code>amount</code> Amount of the payment in the smallest unit of your currency. Example: 100 = $1.00USD
135
+ # * <code>amount</code> Amount of the payment in the smallest unit of your currency. Example: 100 = $1.00
133
136
  # * <code>billingCycle</code> How the plan is billed to the customer. Values must be AUTO (indefinitely until the customer cancels) or FIXED (a fixed number of billing cycles). [default: AUTO]
134
137
  # * <code>billingCycleLimit</code> The number of fixed billing cycles for a plan. Only used if the billingCycle parameter is set to FIXED. Example: 4
135
138
  # * <code>coupon</code> Coupon being assigned to this subscription
136
- # * <code>currency</code> Currency code (ISO-4217). Must match the currency associated with your account. [default: USD]
139
+ # * <code>currency</code> Currency code (ISO-4217). Must match the currency associated with your account.
140
+ # * <code>currentPeriodEnd</code> End date of subscription's current period
141
+ # * <code>currentPeriodStart</code> Start date of subscription's current period
137
142
  # * <code>frequency</code> Frequency of payment for the plan. Used in conjunction with frequencyPeriod. Valid values are "DAILY", "WEEKLY", "MONTHLY" and "YEARLY".
138
143
  # * <code>frequencyPeriod</code> Period of frequency of payment for the plan. Example: if the frequency is weekly, and periodFrequency is 2, then the subscription is billed bi-weekly. [min value: 1]
139
144
  # * <code>name</code> Name describing subscription
data/lib/simplify/tax.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -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>.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -81,10 +81,6 @@ 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.
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>.
88
84
  # 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
85
  # Returns an object where the <code>list</code> property contains the list of TransactionReview objects and the <code>total</code>
90
86
  # property contains the total number of TransactionReview objects available for the given criteria.
@@ -117,8 +113,7 @@ class TransactionReview < Hash
117
113
  # Updates this object
118
114
  #
119
115
  # The properties that can be updated:
120
- # * <code>status</code> Status of the transaction review.
121
- def update()
116
+ def update()
122
117
  h = Simplify::PaymentsApi.execute("transactionReview", 'update', self, self.authentication)
123
118
  self.merge!(h)
124
119
  self
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
data/lib/simplify.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -29,10 +29,8 @@ require File.dirname(__FILE__) + '/simplify/authentication'
29
29
  require File.dirname(__FILE__) + '/simplify/authorization'
30
30
  require File.dirname(__FILE__) + '/simplify/accesstoken'
31
31
  require File.dirname(__FILE__) + '/simplify/cardtoken'
32
- require File.dirname(__FILE__) + '/simplify/chargeback'
33
32
  require File.dirname(__FILE__) + '/simplify/coupon'
34
33
  require File.dirname(__FILE__) + '/simplify/customer'
35
- require File.dirname(__FILE__) + '/simplify/deposit'
36
34
  require File.dirname(__FILE__) + '/simplify/event'
37
35
  require File.dirname(__FILE__) + '/simplify/fraudcheck'
38
36
  require File.dirname(__FILE__) + '/simplify/invoice'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplify
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.8.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: 2015-12-11 00:00:00.000000000 Z
11
+ date: 2022-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -64,11 +64,9 @@ files:
64
64
  - lib/simplify/authentication.rb
65
65
  - lib/simplify/authorization.rb
66
66
  - lib/simplify/cardtoken.rb
67
- - lib/simplify/chargeback.rb
68
67
  - lib/simplify/constants.rb
69
68
  - lib/simplify/coupon.rb
70
69
  - lib/simplify/customer.rb
71
- - lib/simplify/deposit.rb
72
70
  - lib/simplify/event.rb
73
71
  - lib/simplify/fraudcheck.rb
74
72
  - lib/simplify/invoice.rb
@@ -100,8 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
98
  - !ruby/object:Gem::Version
101
99
  version: '0'
102
100
  requirements: []
103
- rubyforge_project:
104
- rubygems_version: 2.4.5.1
101
+ rubygems_version: 3.0.3
105
102
  signing_key:
106
103
  specification_version: 4
107
104
  summary: Simplify Commerce Ruby SDK
@@ -1,96 +0,0 @@
1
- #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
3
- # All rights reserved.
4
- #
5
- # Redistribution and use in source and binary forms, with or without modification, are
6
- # permitted provided that the following conditions are met:
7
- #
8
- # Redistributions of source code must retain the above copyright notice, this list of
9
- # conditions and the following disclaimer.
10
- # Redistributions in binary form must reproduce the above copyright notice, this list of
11
- # conditions and the following disclaimer in the documentation and/or other materials
12
- # provided with the distribution.
13
- # Neither the name of the MasterCard International Incorporated nor the names of its
14
- # contributors may be used to endorse or promote products derived from this software
15
- # without specific prior written permission.
16
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
17
- # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18
- # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
19
- # SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20
- # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
21
- # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22
- # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23
- # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24
- # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25
- # SUCH DAMAGE.
26
- #
27
-
28
- require 'simplify/paymentsapi'
29
-
30
- module Simplify
31
-
32
- # A Chargeback object.
33
- #
34
- class Chargeback < Hash
35
-
36
- # Authentication object used to access the API (See Simplify::Authentication for details)
37
- attr_accessor :authentication
38
-
39
- # Returns the public key used when accessing this object. <b>Deprecated: please use 'authentication' instead.</b>
40
- def public_key
41
- return self.authentication.public_key
42
- end
43
-
44
- # Sets the public key used when accessing this object. <b>Deprecated: please use 'authentication' instead.</b>
45
- def public_key=(k)
46
- return self.authentication.public_key = k
47
- end
48
-
49
- # Returns the private key used when accessing this object. <b>Deprecated: please use 'authentication' instead.</b>
50
- def private_key
51
- return self.authentication.private_key
52
- end
53
-
54
- # Sets the private key used when accessing this object. <b>Deprecated: please use 'authentication' instead.</b>
55
- def private_key=(k)
56
- return self.authentication.private_key = k
57
- end
58
-
59
-
60
- # Retrieve Chargeback objects.
61
- # criteria:: a hash of parameters; valid keys are:
62
- # * <code>filter</code> Filters to apply to the list.
63
- # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
64
- # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
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>.
66
- # 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.
67
- # Returns an object where the <code>list</code> property contains the list of Chargeback objects and the <code>total</code>
68
- # property contains the total number of Chargeback objects available for the given criteria.
69
- def self.list(criteria = nil, *auth)
70
-
71
- auth_obj = Simplify::PaymentsApi.create_auth_object(auth)
72
- h = Simplify::PaymentsApi.execute("chargeback", 'list', criteria, auth_obj)
73
- obj = Chargeback.new()
74
- obj.authentication = auth_obj
75
- obj = obj.merge!(h)
76
- obj
77
-
78
- end
79
-
80
- # Retrieve a Chargeback object from the API
81
- #
82
- # id:: ID of object to retrieve
83
- # 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.
84
- # Returns a Chargeback object.
85
- def self.find(id, *auth)
86
-
87
- auth_obj = Simplify::PaymentsApi.create_auth_object(auth)
88
- h = Simplify::PaymentsApi.execute("chargeback", 'show', {"id" => id}, auth_obj)
89
- obj = Chargeback.new()
90
- obj.authentication = auth_obj
91
- obj = obj.merge!(h)
92
- obj
93
- end
94
-
95
- end
96
- end
@@ -1,96 +0,0 @@
1
- #
2
- # Copyright (c) 2013 - 2015 MasterCard International Incorporated
3
- # All rights reserved.
4
- #
5
- # Redistribution and use in source and binary forms, with or without modification, are
6
- # permitted provided that the following conditions are met:
7
- #
8
- # Redistributions of source code must retain the above copyright notice, this list of
9
- # conditions and the following disclaimer.
10
- # Redistributions in binary form must reproduce the above copyright notice, this list of
11
- # conditions and the following disclaimer in the documentation and/or other materials
12
- # provided with the distribution.
13
- # Neither the name of the MasterCard International Incorporated nor the names of its
14
- # contributors may be used to endorse or promote products derived from this software
15
- # without specific prior written permission.
16
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
17
- # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18
- # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
19
- # SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20
- # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
21
- # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22
- # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23
- # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24
- # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25
- # SUCH DAMAGE.
26
- #
27
-
28
- require 'simplify/paymentsapi'
29
-
30
- module Simplify
31
-
32
- # A Deposit object.
33
- #
34
- class Deposit < Hash
35
-
36
- # Authentication object used to access the API (See Simplify::Authentication for details)
37
- attr_accessor :authentication
38
-
39
- # Returns the public key used when accessing this object. <b>Deprecated: please use 'authentication' instead.</b>
40
- def public_key
41
- return self.authentication.public_key
42
- end
43
-
44
- # Sets the public key used when accessing this object. <b>Deprecated: please use 'authentication' instead.</b>
45
- def public_key=(k)
46
- return self.authentication.public_key = k
47
- end
48
-
49
- # Returns the private key used when accessing this object. <b>Deprecated: please use 'authentication' instead.</b>
50
- def private_key
51
- return self.authentication.private_key
52
- end
53
-
54
- # Sets the private key used when accessing this object. <b>Deprecated: please use 'authentication' instead.</b>
55
- def private_key=(k)
56
- return self.authentication.private_key = k
57
- end
58
-
59
-
60
- # Retrieve Deposit objects.
61
- # criteria:: a hash of parameters; valid keys are:
62
- # * <code>filter</code> Filters to apply to the list.
63
- # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
64
- # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
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
- # 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.
67
- # Returns an object where the <code>list</code> property contains the list of Deposit objects and the <code>total</code>
68
- # property contains the total number of Deposit objects available for the given criteria.
69
- def self.list(criteria = nil, *auth)
70
-
71
- auth_obj = Simplify::PaymentsApi.create_auth_object(auth)
72
- h = Simplify::PaymentsApi.execute("deposit", 'list', criteria, auth_obj)
73
- obj = Deposit.new()
74
- obj.authentication = auth_obj
75
- obj = obj.merge!(h)
76
- obj
77
-
78
- end
79
-
80
- # Retrieve a Deposit object from the API
81
- #
82
- # id:: ID of object to retrieve
83
- # 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.
84
- # Returns a Deposit object.
85
- def self.find(id, *auth)
86
-
87
- auth_obj = Simplify::PaymentsApi.create_auth_object(auth)
88
- h = Simplify::PaymentsApi.execute("deposit", 'show', {"id" => id}, auth_obj)
89
- obj = Deposit.new()
90
- obj.authentication = auth_obj
91
- obj = obj.merge!(h)
92
- obj
93
- end
94
-
95
- end
96
- end