Flexible Shipping for WooCommerce - Version 3.0.7

Version Description

  • 2018-12-07 =
  • Added define to change shop saas domain using SAAS_FLEXIBLESHIPPING_URL_SHOP_DOMAIN
  • Added filter to change shop saas domain flexible_shipping_saas_domain
  • Fixed required PHP version
  • Fixed missing manifests functions
  • Fixed typo in connect notice
  • Fixed translations in integration settings
Download this release

Release Info

Developer jablonowski
Plugin Icon 128x128 Flexible Shipping for WooCommerce
Version 3.0.7
Comparing to
See all releases

Code changes from version 3.0.6 to 3.0.7

Files changed (34) hide show
  1. classes/class-flexible-shipping-plugin.php +1 -1
  2. classes/saas/class-saas-auth-params.php +7 -2
  3. classes/saas/class-saas-shipping-services-manager.php +4 -2
  4. classes/saas/views/html-flexible-shipping-connect-notice.php +1 -1
  5. classes/shipping-method.php +1 -1
  6. flexible-shipping.php +4 -4
  7. inc/wpdesk-tracker/lang/wpdesk-tracker-pl_PL.mo +0 -0
  8. inc/wpdesk-tracker/lang/wpdesk-tracker-pl_PL.po +36 -41
  9. lang/flexible-shipping-pl_PL.mo +0 -0
  10. lang/flexible-shipping-pl_PL.po +28 -27
  11. plugin-create.php +1 -0
  12. readme.txt +9 -1
  13. vendor/autoload.php +1 -1
  14. vendor/composer/autoload_classmap.php +2 -0
  15. vendor/composer/autoload_real.php +7 -7
  16. vendor/composer/autoload_static.php +6 -4
  17. vendor/composer/installed.json +21 -20
  18. vendor/moneyphp/money/.scrutinizer.yml +0 -9
  19. vendor/moneyphp/money/CHANGELOG.md +20 -1
  20. vendor/moneyphp/money/LICENSE +2 -0
  21. vendor/moneyphp/money/README.md +1 -1
  22. vendor/moneyphp/money/composer.json +19 -9
  23. vendor/moneyphp/money/resources/currency.php +7 -7
  24. vendor/moneyphp/money/resources/generate-money-factory.php +61 -0
  25. vendor/moneyphp/money/src/Calculator.php +3 -3
  26. vendor/moneyphp/money/src/Calculator/PhpCalculator.php +2 -18
  27. vendor/moneyphp/money/src/Currency.php +1 -1
  28. vendor/moneyphp/money/src/Exchange/ExchangerExchange.php +50 -0
  29. vendor/moneyphp/money/src/Money.php +89 -32
  30. vendor/moneyphp/money/src/MoneyFactory.php +207 -0
  31. vendor/wpdesk/wp-saas-platform-client/changelog.txt +3 -0
  32. vendor/wpdesk/wp-saas-platform-client/src/ApiClient/ClientFactory.php +2 -1
  33. vendor/wpdesk/wp-saas-platform-client/src/ApiClient/ClientImplementation.php +15 -4
  34. vendor/wpdesk/wp-saas-platform-client/src/PlatformFactoryOptions.php +24 -0
classes/class-flexible-shipping-plugin.php CHANGED
@@ -364,7 +364,7 @@ class Flexible_Shipping_Plugin
364
  */
365
  public function links_filter( $links ) {
366
  $docs_link = get_locale() === 'pl_PL' ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/' : 'https://docs.flexibleshipping.com/collection/20-fs-table-rate/';
367
- $support_link = get_locale() === 'pl_PL' ? 'https://www.wpdesk.pl/support/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=&utm_content=fs-plugins-support' : 'https://flexibleshipping.com/support/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=&utm_content=fs-plugins-support';
368
 
369
  $docs_link .= '??utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=&utm_content=fs-plugins-docs';
370
 
364
  */
365
  public function links_filter( $links ) {
366
  $docs_link = get_locale() === 'pl_PL' ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/' : 'https://docs.flexibleshipping.com/collection/20-fs-table-rate/';
367
+ $support_link = get_locale() === 'pl_PL' ? 'https://www.wpdesk.pl/docs/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=&utm_content=fs-plugins-support' : 'https://flexibleshipping.com/support/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=&utm_content=fs-plugins-support';
368
 
369
  $docs_link .= '??utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=&utm_content=fs-plugins-docs';
370
 
classes/saas/class-saas-auth-params.php CHANGED
@@ -12,9 +12,14 @@ class WPDesk_Flexible_Shipping_SaaS_Auth_Params {
12
  * @return string
13
  */
14
  public function get_user_domain() {
15
- $parsed_url = wp_parse_url( site_url() );
 
 
 
 
 
16
 
17
- return $parsed_url['host'];
18
  }
19
 
20
  /**
12
  * @return string
13
  */
14
  public function get_user_domain() {
15
+ if (!defined("SAAS_FLEXIBLESHIPPING_URL_SHOP_DOMAIN")) {
16
+ $parsed_url = wp_parse_url( site_url() );
17
+ $domain = $parsed_url['host'];
18
+ } else {
19
+ $domain = SAAS_FLEXIBLESHIPPING_URL_SHOP_DOMAIN;
20
+ }
21
 
22
+ return apply_filters('flexible_shipping_saas_domain', $domain);
23
  }
24
 
25
  /**
classes/saas/class-saas-shipping-services-manager.php CHANGED
@@ -88,13 +88,15 @@ class WPDesk_Flexible_Shipping_SaaS_Services_Manager
88
 
89
  $this->saas_platform_links = $saas_platform_links;
90
 
91
- $this->create_saas_shipping_methods();
92
  }
93
 
94
  /**
95
  * Hooks.
96
  */
97
  public function hooks() {
 
 
 
98
  add_filter( 'woocommerce_shipping_methods',
99
  array( $this, 'add_flexible_shipping_connect_shipping_method' )
100
  );
@@ -253,7 +255,7 @@ class WPDesk_Flexible_Shipping_SaaS_Services_Manager
253
  /**
254
  * Create shipping methods.
255
  */
256
- private function create_saas_shipping_methods() {
257
  if ( $this->saas_connection->is_connected() ) {
258
 
259
  $all_services = $this->get_all_services();
88
 
89
  $this->saas_platform_links = $saas_platform_links;
90
 
 
91
  }
92
 
93
  /**
94
  * Hooks.
95
  */
96
  public function hooks() {
97
+
98
+ add_action( 'plugins_loaded', array( $this, 'create_saas_shipping_methods' ) );
99
+
100
  add_filter( 'woocommerce_shipping_methods',
101
  array( $this, 'add_flexible_shipping_connect_shipping_method' )
102
  );
255
  /**
256
  * Create shipping methods.
257
  */
258
+ public function create_saas_shipping_methods() {
259
  if ( $this->saas_connection->is_connected() ) {
260
 
261
  $all_services = $this->get_all_services();
classes/saas/views/html-flexible-shipping-connect-notice.php CHANGED
@@ -3,7 +3,7 @@
3
 
4
  echo '<p>' . __( 'Welcome to new Flexible Shipping Connect installation guide.', 'flexible-shipping' ) . '</p>';
5
 
6
- echo '<p><strong>' . __( 'To complete the installation please click the Sing up for Connect button below.', 'flexible-shipping' ) . '</strong></p>';
7
 
8
  echo '<p>' . sprintf( __( 'The %saccount is free (no credit card needed)%s and allows you to send packages directly from here!', 'flexible-shipping' ), '<strong>', '</strong>' ) . '</p>';
9
 
3
 
4
  echo '<p>' . __( 'Welcome to new Flexible Shipping Connect installation guide.', 'flexible-shipping' ) . '</p>';
5
 
6
+ echo '<p><strong>' . __( 'To complete the installation please click the Sign up for Connect button below.', 'flexible-shipping' ) . '</strong></p>';
7
 
8
  echo '<p>' . sprintf( __( 'The %saccount is free (no credit card needed)%s and allows you to send packages directly from here!', 'flexible-shipping' ), '<strong>', '</strong>' ) . '</p>';
9
 
classes/shipping-method.php CHANGED
@@ -348,7 +348,7 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping' ) ) {
348
  $new_method = true;
349
  $imported_shipping_method = array( 'method_enabled' => 'no' );
350
  if ( !isset( $csv_row['Method Title'] ) || trim( $csv_row['Method Title'] ) == '' ) {
351
- WC_Admin_Settings::add_error( __('Sorry, there has been an error. The CSV is invalid or incorrect file type.' ) );
352
  //WC_Admin_Settings::add_error( sprintf(__('Shipping method title is not set in row number %d.', 'flexible-shipping' ), $import_row_count ) );
353
  WC_Admin_Settings::show_messages();
354
  return;
348
  $new_method = true;
349
  $imported_shipping_method = array( 'method_enabled' => 'no' );
350
  if ( !isset( $csv_row['Method Title'] ) || trim( $csv_row['Method Title'] ) == '' ) {
351
+ WC_Admin_Settings::add_error( __('Sorry, there has been an error. The CSV is invalid or incorrect file type.', 'flexible-shipping' ) );
352
  //WC_Admin_Settings::add_error( sprintf(__('Shipping method title is not set in row number %d.', 'flexible-shipping' ), $import_row_count ) );
353
  WC_Admin_Settings::show_messages();
354
  return;
flexible-shipping.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Flexible Shipping
4
  Plugin URI: https://wordpress.org/plugins/flexible-shipping/
5
  Description: Create additional shipment methods in WooCommerce and enable pricing based on cart weight or total.
6
- Version: 3.0.6
7
  Author: WP Desk
8
  Author URI: https://www.wpdesk.net/
9
  Text Domain: flexible-shipping
@@ -11,7 +11,7 @@
11
  Requires at least: 4.5
12
  Tested up to: 5.0.0
13
  WC requires at least: 3.0.0
14
- WC tested up to: 3.5.1
15
 
16
  Copyright 2017 WP Desk Ltd.
17
 
@@ -43,7 +43,7 @@ if ( ! class_exists( 'WPDesk_Basic_Requirement_Checker' ) ) {
43
 
44
 
45
  /* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
46
- $plugin_version = '3.0.6';
47
  $plugin_release_timestamp = '2018-11-28';
48
 
49
  $plugin_name = 'Flexible Shipping';
@@ -57,7 +57,7 @@ $requirements_checker = new WPDesk_Basic_Requirement_Checker(
57
  __FILE__,
58
  $plugin_name,
59
  $plugin_text_domain,
60
- '5.5',
61
  '4.5'
62
  );
63
  $requirements_checker->add_plugin_require( 'woocommerce/woocommerce.php', 'Woocommerce' );
3
  Plugin Name: Flexible Shipping
4
  Plugin URI: https://wordpress.org/plugins/flexible-shipping/
5
  Description: Create additional shipment methods in WooCommerce and enable pricing based on cart weight or total.
6
+ Version: 3.0.7
7
  Author: WP Desk
8
  Author URI: https://www.wpdesk.net/
9
  Text Domain: flexible-shipping
11
  Requires at least: 4.5
12
  Tested up to: 5.0.0
13
  WC requires at least: 3.0.0
14
+ WC tested up to: 3.5.2
15
 
16
  Copyright 2017 WP Desk Ltd.
17
 
43
 
44
 
45
  /* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
46
+ $plugin_version = '3.0.7';
47
  $plugin_release_timestamp = '2018-11-28';
48
 
49
  $plugin_name = 'Flexible Shipping';
57
  __FILE__,
58
  $plugin_name,
59
  $plugin_text_domain,
60
+ '5.6',
61
  '4.5'
62
  );
63
  $requirements_checker->add_plugin_require( 'woocommerce/woocommerce.php', 'Woocommerce' );
inc/wpdesk-tracker/lang/wpdesk-tracker-pl_PL.mo CHANGED
Binary file
inc/wpdesk-tracker/lang/wpdesk-tracker-pl_PL.po CHANGED
@@ -1,15 +1,15 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WP Desk Tracker\n"
4
- "POT-Creation-Date: 2017-10-04 17:34+0200\n"
5
- "PO-Revision-Date: 2017-10-04 17:36+0200\n"
6
  "Last-Translator: Piotr Jabłonowski <piotr.jablonowski@wpdesk.net>\n"
7
  "Language-Team: \n"
8
  "Language: pl_PL\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 2.0.3\n"
13
  "X-Poedit-Basepath: ../..\n"
14
  "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
15
  "|| n%100>=20) ? 1 : 2);\n"
@@ -20,27 +20,32 @@ msgstr ""
20
  "X-Poedit-SearchPath-0: .\n"
21
  "X-Poedit-SearchPathExcluded-0: wpdesk-logger.php\n"
22
 
 
 
 
 
 
 
 
23
  #: wpdesk-tracker/views/tracker-connect.php:7
24
  #: wpdesk-tracker/views/tracker-notice.php:5
25
- #: wpdesk-tracker/views/tracker-notice.php:22
26
  #, php-format
27
  msgid "Hey %s,"
28
  msgstr "Hej %s,"
29
 
30
  #: wpdesk-tracker/views/tracker-connect.php:8
31
- #: wpdesk-tracker/views/tracker-notice.php:23
32
  msgid ""
33
  "Please help us improve our plugins! If you opt-in, we will collect some non-"
34
- "sensitive data and usage information. If you skip this, that's okay! All "
35
- "plugins will work just fine."
36
  msgstr ""
37
  "Proszę pomóż nam udoskonalić nasze wtyczki! Jeśli się zgodzisz, będziemy "
38
- "zbierać niewrażliwe dane użytkowania. Jeśli pominiesz ten krok, w porządku! "
39
- "Wszystkie wtyczki będą działać."
40
 
41
  #: wpdesk-tracker/views/tracker-connect.php:13
42
  msgid "Allow & Continue &rarr;"
43
- msgstr "Pozwól i kontunuuj &rarr;"
44
 
45
  #: wpdesk-tracker/views/tracker-connect.php:14
46
  msgid "Skip"
@@ -55,8 +60,8 @@ msgid "Your Site Overview"
55
  msgstr "Dane witryny"
56
 
57
  #: wpdesk-tracker/views/tracker-connect.php:27
58
- msgid "Site URL, WP version, PHP info, admin email"
59
- msgstr "URL strony, wersja WP, wersja PHP, email admina"
60
 
61
  #: wpdesk-tracker/views/tracker-connect.php:33
62
  msgid "Plugin Usage"
@@ -71,21 +76,11 @@ msgid "Your Store Overview"
71
  msgstr "Dane sklepu"
72
 
73
  #: wpdesk-tracker/views/tracker-connect.php:41
74
- msgid "Non-sensitive store usage information"
75
- msgstr "Tylko niewrażliwe dane o użytkowaniu sklepu"
76
 
77
  #: wpdesk-tracker/views/tracker-connect.php:47
78
- msgid "Admin Updates"
79
- msgstr "Powiadomienia"
80
-
81
- #: wpdesk-tracker/views/tracker-connect.php:48
82
- msgid "Announcements, updates, marketing, no spam and easy opt-out"
83
- msgstr ""
84
- "Ważne powiadomienia, uaktualnienia, marketing, żadnego spamu i łatwa "
85
- "rezygnacja"
86
-
87
- #: wpdesk-tracker/views/tracker-connect.php:54
88
- #: wpdesk-tracker/views/tracker-notice.php:24
89
  msgid "Find out more &raquo;"
90
  msgstr "Dowiedz się więcej &raquo;"
91
 
@@ -99,7 +94,7 @@ msgid ""
99
  " If you have a moment, please let us know why you are deactivating plugin "
100
  "(anonymous feedback):"
101
  msgstr ""
102
- "Jeśli masz chwilę, prosimy daj nam znać dlaczego dezaktywowałeś wtyczkę "
103
  "(anonimowa opinia):"
104
 
105
  #: wpdesk-tracker/views/tracker-deactivate.php:16
@@ -128,7 +123,7 @@ msgstr "Nie potrzebuję już wtyczki"
128
 
129
  #: wpdesk-tracker/views/tracker-deactivate.php:59
130
  msgid "It's a temporary deactivation. I'm just debugging an issue."
131
- msgstr "Jest to tymczasowa dezaktywacja, debaguję problem"
132
 
133
  #: wpdesk-tracker/views/tracker-deactivate.php:67
134
  msgid "Other"
@@ -150,28 +145,20 @@ msgstr "Anuluj"
150
  msgid "Submit &amp; Deactivate"
151
  msgstr "Wyślij i dezaktywuj"
152
 
153
- #: wpdesk-tracker/views/tracker-notice.php:8
154
- #, php-format
155
  msgid ""
156
  "We need your help to improve <strong>WP Desk plugins</strong>, so they are "
157
- "more useful for you and the rest of <strong>10,000+ users</strong>. By "
158
  "collecting data on how you use our plugins, you will help us a lot. We will "
159
- "not collect any sensitive data, so you can feel safe. As a thank you for "
160
- "your consent, we will send you a <strong>discount coupon</strong> for %sWP "
161
- "Desk plugins%s, which you can use yourself or share with others. %sFind out "
162
- "more &raquo;%s"
163
  msgstr ""
164
  "Potrzebujemy Twojej pomocy, aby dalej rozwijać <strong>wtyczki WP Desk</"
165
  "strong> i były one jeszcze bardziej pomocne dla Ciebie i pozostałych ponad "
166
- "<strong>10 000 użytkowników</strong>. Zbierając dane na temat tego jak "
167
  "korzystasz z naszych wtyczek bardzo nam w tym pomożesz. Nie będziemy zbierać "
168
- "żadnych danych wrażliwych, więc możesz czuć się bezpiecznie. W zamian za "
169
- "Twoją zgodę otrzymasz <strong>kupon rabatowy</strong> na %swtyczki WP Desk"
170
- "%s, który możesz wykorzystać sam lub podzielić się z innymi. %sDowiedz się "
171
- "więcej &raquo;%s"
172
 
173
- #: wpdesk-tracker/views/tracker-notice.php:16
174
- #: wpdesk-tracker/views/tracker-notice.php:27
175
  msgid "Allow"
176
  msgstr "Pozwól"
177
 
@@ -184,6 +171,14 @@ msgstr ""
184
  "została przyjęta. Jeśli zmienisz zdanie, zawsze możesz włączyć zgodę poprzez "
185
  "szybkie linki w menu wtyczek."
186
 
 
 
 
 
 
 
 
 
187
  #~ msgid ""
188
  #~ "Please help us improve our plugins and get a <strong>20&#37; discount "
189
  #~ "coupon</strong> for <strong>WP Desk</strong> plugins."
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WP Desk Tracker\n"
4
+ "POT-Creation-Date: 2018-12-04 22:15+0100\n"
5
+ "PO-Revision-Date: 2018-12-04 22:27+0100\n"
6
  "Last-Translator: Piotr Jabłonowski <piotr.jablonowski@wpdesk.net>\n"
7
  "Language-Team: \n"
8
  "Language: pl_PL\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 2.2\n"
13
  "X-Poedit-Basepath: ../..\n"
14
  "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
15
  "|| n%100>=20) ? 1 : 2);\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
  "X-Poedit-SearchPathExcluded-0: wpdesk-logger.php\n"
22
 
23
+ #: functions.php:67
24
+ #, php-format
25
+ msgid "Redirecting. If page not redirects click %s here %s."
26
+ msgstr ""
27
+ "Przekierowywanie. Jeśli strona nie przekierowuje cię automatycznie, kliknij "
28
+ "%s tu %s."
29
+
30
  #: wpdesk-tracker/views/tracker-connect.php:7
31
  #: wpdesk-tracker/views/tracker-notice.php:5
 
32
  #, php-format
33
  msgid "Hey %s,"
34
  msgstr "Hej %s,"
35
 
36
  #: wpdesk-tracker/views/tracker-connect.php:8
 
37
  msgid ""
38
  "Please help us improve our plugins! If you opt-in, we will collect some non-"
39
+ "sensitive data and usage information anonymously. If you skip this, that's "
40
+ "okay! All plugins will work just fine."
41
  msgstr ""
42
  "Proszę pomóż nam udoskonalić nasze wtyczki! Jeśli się zgodzisz, będziemy "
43
+ "zbierać niewrażliwe i anonimowe dane użytkowania. Jeśli pominiesz ten krok, "
44
+ "w porządku! Wszystkie wtyczki będą działać."
45
 
46
  #: wpdesk-tracker/views/tracker-connect.php:13
47
  msgid "Allow & Continue &rarr;"
48
+ msgstr "Pozwól i kontynuuj &rarr;"
49
 
50
  #: wpdesk-tracker/views/tracker-connect.php:14
51
  msgid "Skip"
60
  msgstr "Dane witryny"
61
 
62
  #: wpdesk-tracker/views/tracker-connect.php:27
63
+ msgid "WP version, PHP info"
64
+ msgstr "Wersja WP, wersja PHP"
65
 
66
  #: wpdesk-tracker/views/tracker-connect.php:33
67
  msgid "Plugin Usage"
76
  msgstr "Dane sklepu"
77
 
78
  #: wpdesk-tracker/views/tracker-connect.php:41
79
+ msgid "Anonymized and non-sensitive store usage information"
80
+ msgstr "Tylko niewrażliwe i anonimowe dane o użytkowaniu sklepu"
81
 
82
  #: wpdesk-tracker/views/tracker-connect.php:47
83
+ #: wpdesk-tracker/views/tracker-notice.php:7
 
 
 
 
 
 
 
 
 
 
84
  msgid "Find out more &raquo;"
85
  msgstr "Dowiedz się więcej &raquo;"
86
 
94
  " If you have a moment, please let us know why you are deactivating plugin "
95
  "(anonymous feedback):"
96
  msgstr ""
97
+ " Jeśli masz chwilę, prosimy daj nam znać dlaczego dezaktywowałeś wtyczkę "
98
  "(anonimowa opinia):"
99
 
100
  #: wpdesk-tracker/views/tracker-deactivate.php:16
123
 
124
  #: wpdesk-tracker/views/tracker-deactivate.php:59
125
  msgid "It's a temporary deactivation. I'm just debugging an issue."
126
+ msgstr "Jest to tymczasowa dezaktywacja, debaguję problem."
127
 
128
  #: wpdesk-tracker/views/tracker-deactivate.php:67
129
  msgid "Other"
145
  msgid "Submit &amp; Deactivate"
146
  msgstr "Wyślij i dezaktywuj"
147
 
148
+ #: wpdesk-tracker/views/tracker-notice.php:6
 
149
  msgid ""
150
  "We need your help to improve <strong>WP Desk plugins</strong>, so they are "
151
+ "more useful for you and the rest of <strong>30,000+ users</strong>. By "
152
  "collecting data on how you use our plugins, you will help us a lot. We will "
153
+ "not collect any sensitive data, so you can feel safe."
 
 
 
154
  msgstr ""
155
  "Potrzebujemy Twojej pomocy, aby dalej rozwijać <strong>wtyczki WP Desk</"
156
  "strong> i były one jeszcze bardziej pomocne dla Ciebie i pozostałych ponad "
157
+ "<strong>30 000 użytkowników</strong>. Zbierając dane na temat tego jak "
158
  "korzystasz z naszych wtyczek bardzo nam w tym pomożesz. Nie będziemy zbierać "
159
+ "żadnych danych wrażliwych, więc możesz czuć się bezpiecznie."
 
 
 
160
 
161
+ #: wpdesk-tracker/views/tracker-notice.php:10
 
162
  msgid "Allow"
163
  msgstr "Pozwól"
164
 
171
  "została przyjęta. Jeśli zmienisz zdanie, zawsze możesz włączyć zgodę poprzez "
172
  "szybkie linki w menu wtyczek."
173
 
174
+ #~ msgid "Admin Updates"
175
+ #~ msgstr "Powiadomienia"
176
+
177
+ #~ msgid "Announcements, updates, marketing, no spam and easy opt-out"
178
+ #~ msgstr ""
179
+ #~ "Ważne powiadomienia, uaktualnienia, marketing, żadnego spamu i łatwa "
180
+ #~ "rezygnacja"
181
+
182
  #~ msgid ""
183
  #~ "Please help us improve our plugins and get a <strong>20&#37; discount "
184
  #~ "coupon</strong> for <strong>WP Desk</strong> plugins."
lang/flexible-shipping-pl_PL.mo CHANGED
Binary file
lang/flexible-shipping-pl_PL.po CHANGED
@@ -1,15 +1,15 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Flexible Shipping\n"
4
- "POT-Creation-Date: 2018-11-29 14:04+0100\n"
5
- "PO-Revision-Date: 2018-11-29 14:04+0100\n"
6
  "Last-Translator: Piotr Jabłonowski <piotr.jablonowski@wpdesk.net>\n"
7
  "Language-Team: Maciej Swoboda <maciej.swoboda@gmail.com>\n"
8
  "Language: pl_PL\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 2.2\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "X-Poedit-WPHeader: flexible-shipping.php\n"
15
  "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
@@ -104,7 +104,7 @@ msgstr "Wysyłka"
104
 
105
  #: classes/bulk-actions.php:269
106
  msgid "Send shipment"
107
- msgstr "Nadaj przesyłki"
108
 
109
  #: classes/bulk-actions.php:270
110
  msgid "Get labels"
@@ -120,7 +120,7 @@ msgstr "Przesyłka utworzona."
120
 
121
  #: classes/bulk-actions.php:306
122
  msgid "No action performed."
123
- msgstr "Nie wykonano żdanych działań."
124
 
125
  #: classes/bulk-actions.php:326
126
  msgid "Label downloaded."
@@ -131,7 +131,7 @@ msgid ""
131
  "Unable to create temporary zip archive for labels. Check temporary folder "
132
  "configuration on server."
133
  msgstr ""
134
- "Nie można utworzyć tymczasowego archwium zip dla etykiet. Sprawdź "
135
  "konfigurację folderu na serwerze."
136
 
137
  #: classes/bulk-actions.php:408
@@ -140,7 +140,7 @@ msgid ""
140
  "Created manifest: %s (%s). If download not start automatically click %shere"
141
  "%s."
142
  msgstr ""
143
- "Utworzone protokoły nadania: %s (%s). Jesli pobieranie nie rozpoczęło się "
144
  "automatycznie kliknij %stutaj%s."
145
 
146
  #: classes/bulk-actions.php:420
@@ -221,7 +221,7 @@ msgstr "Plik nie istnieje!"
221
 
222
  #: classes/logger/class-saas-logger-downloader.php:60
223
  msgid "Insufficient privileges!"
224
- msgstr "Niewystraczające uprawnienia!"
225
 
226
  #: classes/logger/class-saas-logger-settings.php:95
227
  msgid "Advanced settings"
@@ -261,7 +261,7 @@ msgstr "Dodaj nowy Protokół nadania"
261
 
262
  #: classes/manifest/cpt-shipping-manifest.php:67
263
  msgid "Add new Shipping Manifests"
264
- msgstr "Dodaj nowe Protokoły nadania"
265
 
266
  #: classes/manifest/cpt-shipping-manifest.php:68
267
  msgid "Edit Shipping Manifest"
@@ -396,7 +396,7 @@ msgstr "Sprawdzanie…"
396
 
397
  #: classes/saas/class-saas-connection-status-field.php:67
398
  msgid "Something go wrong! (AJAX)"
399
- msgstr "Coś pójdzie nie tak! (AJAX)"
400
 
401
  #: classes/saas/class-saas-connection-status-field.php:70
402
  msgid "Add credentials"
@@ -473,7 +473,7 @@ msgid ""
473
  "key."
474
  msgstr ""
475
  "Wprowadzony klucz Connect jest nieprawidłowy. Proszę wprowadzić prawidłowy "
476
- "klucz. %1$sZarejestruj się%3$s lub zaloguj na %2$sistniejące konto%3$s aby "
477
  "otrzymać klucz."
478
 
479
  #: classes/saas/class-saas-connection.php:578
@@ -533,7 +533,7 @@ msgid ""
533
  "Enable services to automate shipping and print labels with Flexible Shipping "
534
  "Connect."
535
  msgstr ""
536
- "Włącz usługi aby automatyzować wysyłkę i pobierać etykiety dzięki Flexible "
537
  "Shipping Connect."
538
 
539
  #: classes/saas/class-saas-shipment-order-auto-complete.php:59
@@ -551,7 +551,7 @@ msgstr "Manualnie"
551
 
552
  #: classes/saas/class-saas-shipment-settings-field.php:43
553
  msgid "Automatically"
554
- msgstr "Automatyczne"
555
 
556
  #: classes/saas/class-saas-shipment-settings-field.php:45
557
  msgid ""
@@ -590,7 +590,7 @@ msgstr "Invalid format - contact with flexibleshipping.com administrator."
590
  #: classes/saas/class-saas-shipping-service-settings.php:254
591
  #, php-format
592
  msgid "Ups, something is wrong. Error code: %1$s."
593
- msgstr "UPS nie działa poprawnie. Kod błędu: %1$s."
594
 
595
  #: classes/saas/class-saas-shipping-service.php:539
596
  msgid "Rates type"
@@ -608,7 +608,7 @@ msgid ""
608
  "selected %1$s service). Choose live rates if you want to present services "
609
  "and rates for the customer's address."
610
  msgstr ""
611
- "Wybierz własne stawki aby ustawić niestandardowe koszty wysyłki (metodą "
612
  "wysyłki będzie wybrana usługa %1$s). Wybierz stawki Live, jeśli chcesz "
613
  "prezentować usługi i stawki wg. adresu klienta."
614
 
@@ -637,7 +637,7 @@ msgid ""
637
  "Enable to offer flat rate cost for shipping so that the user can still "
638
  "checkout, if API returns no matching rates."
639
  msgstr ""
640
- "Włącz aby oferować płaską stawkę wysyłki. Klient będzie mógł zrealizować "
641
  "zamówienia jeśli API nie zwróci żadnych usług."
642
 
643
  #: classes/saas/class-saas-shipping-service.php:755
@@ -676,7 +676,7 @@ msgid ""
676
  "to connect (%3$s).%2$s If you haven't received the email, please %4$scontact "
677
  "us%5$s."
678
  msgstr ""
679
- "%1$sUtworzono konto, sprawdź swój e-mail i kliknij link aktywacyjny aby się "
680
  "połączyć (%3$s).%2$s Jeśli nie otrzymałeś e-maila, proszę %4$sskontaktuj się "
681
  "z nami%5$s."
682
 
@@ -772,7 +772,7 @@ msgstr ""
772
  #: classes/saas/views/html-boxes-content.php:28
773
  #: classes/saas/views/html-boxes-content.php:29
774
  msgid "Create Shipments"
775
- msgstr "Utwórz przesyłkę"
776
 
777
  #: classes/saas/views/html-boxes-content.php:30
778
  msgid ""
@@ -818,7 +818,7 @@ msgid ""
818
  "%2$syour account%3$s to get your key."
819
  msgstr ""
820
  "%1$sZarejestruj%3$s nowe konto Flexible Shipping Connect lub zaloguj się do "
821
- "%2$sistniejącego konta%3$s aby otrzymać klucz."
822
 
823
  #: classes/saas/views/html-field-saas-connection.php:18
824
  msgid "Check how to start with FS Connect &rarr;"
@@ -830,7 +830,7 @@ msgstr "Witamy w przewodniku o nowym Flexible Shipping Connect."
830
 
831
  #: classes/saas/views/html-flexible-shipping-connect-notice.php:6
832
  msgid ""
833
- "To complete the installation please click the Sing up for Connect button "
834
  "below."
835
  msgstr ""
836
  "Aby zakończyć instalację, kliknij poniżej przycisk Zarejestruj się w Connect."
@@ -923,7 +923,7 @@ msgstr "Dołącz do Flexible Shipping Connect!"
923
  #: classes/saas/views/html-registration-page.php:16
924
  msgid "Sign up for automatic shipments, label printing, live rates and more!"
925
  msgstr ""
926
- "Zarejestruj się aby automatyzować przesyłkę, drukować etykiety, pobierać "
927
  "stawki i wiele więcej!"
928
 
929
  #: classes/saas/views/html-registration-page.php:18
@@ -1533,7 +1533,7 @@ msgid ""
1533
  "Drag and drop the services to control their display order. Confirm by "
1534
  "clicking Save changes button below."
1535
  msgstr ""
1536
- "Przeciągnij i upuść usługę aby zmienić kolejność wyświetlania. Zatwierdź "
1537
  "zmiany klikając Zapisz zmiany poniżej."
1538
 
1539
  #: classes/views/html-order-add_shipping-metabox.php:15
@@ -1591,7 +1591,7 @@ msgstr ""
1591
 
1592
  #: classes/views/html-shipping-method-rules.php:80
1593
  msgid "Max"
1594
- msgstr "Max"
1595
 
1596
  #: classes/views/html-shipping-method-rules.php:81
1597
  msgid ""
@@ -1655,7 +1655,7 @@ msgid ""
1655
  "Drag and drop the above shipment methods to control their display order. "
1656
  "Confirm by clicking Save changes button below."
1657
  msgstr ""
1658
- "Przeciągnij i upuść metody wysyłki aby ustawić ich kolejność wyświetlania. "
1659
  "Potwierdź przez kliknięcie przycisku Zapisz zmiany poniżej."
1660
 
1661
  #: classes/views/html-shipping-method-settings.php:74
@@ -1704,7 +1704,7 @@ msgstr ""
1704
 
1705
  #: inc/wpdesk-tracker/views/tracker-connect.php:13
1706
  msgid "Allow & Continue &rarr;"
1707
- msgstr "Pozwól i kontunuuj &rarr;"
1708
 
1709
  #: inc/wpdesk-tracker/views/tracker-connect.php:14
1710
  msgid "Skip"
@@ -1790,7 +1790,7 @@ msgstr "Inny"
1790
 
1791
  #: inc/wpdesk-tracker/views/tracker-deactivate.php:70
1792
  msgid "Kindly tell us the reason so we can improve"
1793
- msgstr "Napisz nam powód abyśmy mogli go poprawić"
1794
 
1795
  #: inc/wpdesk-tracker/views/tracker-deactivate.php:77
1796
  msgid "Skip &amp; Deactivate"
@@ -1986,7 +1986,8 @@ msgstr "Klucz licencyjny %1$s"
1986
  #: vendor/wpdesk/wp-settings/source/modules/licensing/class.s214-license.php:160
1987
  msgid "Please enter your license key to enable automatic updates and support."
1988
  msgstr ""
1989
- "Wpisz swój klucz licencyjny aby włączyć automatyczne aktualizacje i wsparcie."
 
1990
 
1991
  #: vendor/wpdesk/wp-settings/source/modules/licensing/class.s214-license.php:197
1992
  #: vendor/wpdesk/wp-settings/source/modules/licensing/class.s214-license.php:270
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Flexible Shipping\n"
4
+ "POT-Creation-Date: 2018-12-03 16:05+0100\n"
5
+ "PO-Revision-Date: 2018-12-06 09:50+0100\n"
6
  "Last-Translator: Piotr Jabłonowski <piotr.jablonowski@wpdesk.net>\n"
7
  "Language-Team: Maciej Swoboda <maciej.swoboda@gmail.com>\n"
8
  "Language: pl_PL\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 2.0.6\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "X-Poedit-WPHeader: flexible-shipping.php\n"
15
  "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
104
 
105
  #: classes/bulk-actions.php:269
106
  msgid "Send shipment"
107
+ msgstr "Nadaj przesyłkę"
108
 
109
  #: classes/bulk-actions.php:270
110
  msgid "Get labels"
120
 
121
  #: classes/bulk-actions.php:306
122
  msgid "No action performed."
123
+ msgstr "Nie wykonano żadnych działań."
124
 
125
  #: classes/bulk-actions.php:326
126
  msgid "Label downloaded."
131
  "Unable to create temporary zip archive for labels. Check temporary folder "
132
  "configuration on server."
133
  msgstr ""
134
+ "Nie można utworzyć tymczasowego archiwum zip dla etykiet. Sprawdź "
135
  "konfigurację folderu na serwerze."
136
 
137
  #: classes/bulk-actions.php:408
140
  "Created manifest: %s (%s). If download not start automatically click %shere"
141
  "%s."
142
  msgstr ""
143
+ "Utworzone protokoły nadania: %s (%s). Jeśli pobieranie nie rozpoczęło się "
144
  "automatycznie kliknij %stutaj%s."
145
 
146
  #: classes/bulk-actions.php:420
221
 
222
  #: classes/logger/class-saas-logger-downloader.php:60
223
  msgid "Insufficient privileges!"
224
+ msgstr "Niewystarczające uprawnienia!"
225
 
226
  #: classes/logger/class-saas-logger-settings.php:95
227
  msgid "Advanced settings"
261
 
262
  #: classes/manifest/cpt-shipping-manifest.php:67
263
  msgid "Add new Shipping Manifests"
264
+ msgstr "Dodaj nowe protokoły nadania"
265
 
266
  #: classes/manifest/cpt-shipping-manifest.php:68
267
  msgid "Edit Shipping Manifest"
396
 
397
  #: classes/saas/class-saas-connection-status-field.php:67
398
  msgid "Something go wrong! (AJAX)"
399
+ msgstr "Coś poszło nie tak! (AJAX)"
400
 
401
  #: classes/saas/class-saas-connection-status-field.php:70
402
  msgid "Add credentials"
473
  "key."
474
  msgstr ""
475
  "Wprowadzony klucz Connect jest nieprawidłowy. Proszę wprowadzić prawidłowy "
476
+ "klucz. %1$sZarejestruj się%3$s lub zaloguj na %2$sistniejące konto%3$s, aby "
477
  "otrzymać klucz."
478
 
479
  #: classes/saas/class-saas-connection.php:578
533
  "Enable services to automate shipping and print labels with Flexible Shipping "
534
  "Connect."
535
  msgstr ""
536
+ "Włącz usługi, aby automatyzować wysyłkę i pobierać etykiety dzięki Flexible "
537
  "Shipping Connect."
538
 
539
  #: classes/saas/class-saas-shipment-order-auto-complete.php:59
551
 
552
  #: classes/saas/class-saas-shipment-settings-field.php:43
553
  msgid "Automatically"
554
+ msgstr "Automatycznie"
555
 
556
  #: classes/saas/class-saas-shipment-settings-field.php:45
557
  msgid ""
590
  #: classes/saas/class-saas-shipping-service-settings.php:254
591
  #, php-format
592
  msgid "Ups, something is wrong. Error code: %1$s."
593
+ msgstr "Ups, coś poszło nie tak. Kod błędu: %1$s."
594
 
595
  #: classes/saas/class-saas-shipping-service.php:539
596
  msgid "Rates type"
608
  "selected %1$s service). Choose live rates if you want to present services "
609
  "and rates for the customer's address."
610
  msgstr ""
611
+ "Wybierz własne stawki, aby ustawić niestandardowe koszty wysyłki (metodą "
612
  "wysyłki będzie wybrana usługa %1$s). Wybierz stawki Live, jeśli chcesz "
613
  "prezentować usługi i stawki wg. adresu klienta."
614
 
637
  "Enable to offer flat rate cost for shipping so that the user can still "
638
  "checkout, if API returns no matching rates."
639
  msgstr ""
640
+ "Włącz, aby oferować płaską stawkę wysyłki. Klient będzie mógł zrealizować "
641
  "zamówienia jeśli API nie zwróci żadnych usług."
642
 
643
  #: classes/saas/class-saas-shipping-service.php:755
676
  "to connect (%3$s).%2$s If you haven't received the email, please %4$scontact "
677
  "us%5$s."
678
  msgstr ""
679
+ "%1$sUtworzono konto, sprawdź swój e-mail i kliknij link aktywacyjny, aby się "
680
  "połączyć (%3$s).%2$s Jeśli nie otrzymałeś e-maila, proszę %4$sskontaktuj się "
681
  "z nami%5$s."
682
 
772
  #: classes/saas/views/html-boxes-content.php:28
773
  #: classes/saas/views/html-boxes-content.php:29
774
  msgid "Create Shipments"
775
+ msgstr "Twórz przesyłki"
776
 
777
  #: classes/saas/views/html-boxes-content.php:30
778
  msgid ""
818
  "%2$syour account%3$s to get your key."
819
  msgstr ""
820
  "%1$sZarejestruj%3$s nowe konto Flexible Shipping Connect lub zaloguj się do "
821
+ "%2$sswojego konta%3$s, aby otrzymać klucz."
822
 
823
  #: classes/saas/views/html-field-saas-connection.php:18
824
  msgid "Check how to start with FS Connect &rarr;"
830
 
831
  #: classes/saas/views/html-flexible-shipping-connect-notice.php:6
832
  msgid ""
833
+ "To complete the installation please click the Sign up for Connect button "
834
  "below."
835
  msgstr ""
836
  "Aby zakończyć instalację, kliknij poniżej przycisk Zarejestruj się w Connect."
923
  #: classes/saas/views/html-registration-page.php:16
924
  msgid "Sign up for automatic shipments, label printing, live rates and more!"
925
  msgstr ""
926
+ "Zarejestruj się, aby automatyzować przesyłkę, drukować etykiety, pobierać "
927
  "stawki i wiele więcej!"
928
 
929
  #: classes/saas/views/html-registration-page.php:18
1533
  "Drag and drop the services to control their display order. Confirm by "
1534
  "clicking Save changes button below."
1535
  msgstr ""
1536
+ "Przeciągnij i upuść usługę, aby zmienić kolejność wyświetlania. Zatwierdź "
1537
  "zmiany klikając Zapisz zmiany poniżej."
1538
 
1539
  #: classes/views/html-order-add_shipping-metabox.php:15
1591
 
1592
  #: classes/views/html-shipping-method-rules.php:80
1593
  msgid "Max"
1594
+ msgstr "Maks"
1595
 
1596
  #: classes/views/html-shipping-method-rules.php:81
1597
  msgid ""
1655
  "Drag and drop the above shipment methods to control their display order. "
1656
  "Confirm by clicking Save changes button below."
1657
  msgstr ""
1658
+ "Przeciągnij i upuść metody wysyłki, aby ustawić ich kolejność wyświetlania. "
1659
  "Potwierdź przez kliknięcie przycisku Zapisz zmiany poniżej."
1660
 
1661
  #: classes/views/html-shipping-method-settings.php:74
1704
 
1705
  #: inc/wpdesk-tracker/views/tracker-connect.php:13
1706
  msgid "Allow & Continue &rarr;"
1707
+ msgstr "Pozwól i kontynuuj &rarr;"
1708
 
1709
  #: inc/wpdesk-tracker/views/tracker-connect.php:14
1710
  msgid "Skip"
1790
 
1791
  #: inc/wpdesk-tracker/views/tracker-deactivate.php:70
1792
  msgid "Kindly tell us the reason so we can improve"
1793
+ msgstr "Napisz nam powód, abyśmy mogli go poprawić"
1794
 
1795
  #: inc/wpdesk-tracker/views/tracker-deactivate.php:77
1796
  msgid "Skip &amp; Deactivate"
1986
  #: vendor/wpdesk/wp-settings/source/modules/licensing/class.s214-license.php:160
1987
  msgid "Please enter your license key to enable automatic updates and support."
1988
  msgstr ""
1989
+ "Wpisz swój klucz licencyjny, aby włączyć automatyczne aktualizacje i "
1990
+ "wsparcie."
1991
 
1992
  #: vendor/wpdesk/wp-settings/source/modules/licensing/class.s214-license.php:197
1993
  #: vendor/wpdesk/wp-settings/source/modules/licensing/class.s214-license.php:270
plugin-create.php CHANGED
@@ -33,6 +33,7 @@ if ( ! function_exists( 'flexible_shipping_plugins_loaded' ) ) {
33
 
34
  require_once( __DIR__ . '/inc/functions.php' );
35
  require_once( __DIR__ . '/classes/shipment/functions.php' );
 
36
 
37
  if ( !function_exists( 'wpdesk_is_plugin_active' ) ) {
38
  function wpdesk_is_plugin_active( $plugin_file ) {
33
 
34
  require_once( __DIR__ . '/inc/functions.php' );
35
  require_once( __DIR__ . '/classes/shipment/functions.php' );
36
+ require_once( __DIR__ . '/classes/manifest/functions.php' );
37
 
38
  if ( !function_exists( 'wpdesk_is_plugin_active' ) ) {
39
  function wpdesk_is_plugin_active( $plugin_file ) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://flexibleshipping.com/table-rate/
4
  Tags: table rate, table rate shipping, woocommerce shipping, flexible shipping, woocommerce table rate shipping, cart based shipping, weight shipping, weight based shipping, totals based shipping, order based shipping, shipping zones, shipping classes
5
  Requires at least: 4.5
6
  Tested up to: 5.0.0
7
- Stable tag: 3.0.6
8
  Requires PHP: 5.6
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -175,6 +175,14 @@ If you are upgrading from the old Flexible Shipping version (1.3.2, woo-flexible
175
 
176
  == Changelog ==
177
 
 
 
 
 
 
 
 
 
178
  = 3.0.6 - 2018-11-29 =
179
  * Added Flexible Shipping Connect to create packages and generate shipping labels automatically from WooCommerce Orders list and manually from each order
180
  * Added integration with UPS (Worldwide). Now you can connect your shop with your UPS account. No extra software is needed. You can cover the whole shipping process directly from your UPS WooCommerce environment.
4
  Tags: table rate, table rate shipping, woocommerce shipping, flexible shipping, woocommerce table rate shipping, cart based shipping, weight shipping, weight based shipping, totals based shipping, order based shipping, shipping zones, shipping classes
5
  Requires at least: 4.5
6
  Tested up to: 5.0.0
7
+ Stable tag: 3.0.7
8
  Requires PHP: 5.6
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
175
 
176
  == Changelog ==
177
 
178
+ = 3.0.7 - 2018-12-07 =
179
+ * Added define to change shop saas domain using SAAS_FLEXIBLESHIPPING_URL_SHOP_DOMAIN
180
+ * Added filter to change shop saas domain flexible_shipping_saas_domain
181
+ * Fixed required PHP version
182
+ * Fixed missing manifests functions
183
+ * Fixed typo in connect notice
184
+ * Fixed translations in integration settings
185
+
186
  = 3.0.6 - 2018-11-29 =
187
  * Added Flexible Shipping Connect to create packages and generate shipping labels automatically from WooCommerce Orders list and manually from each order
188
  * Added integration with UPS (Worldwide). Now you can connect your shop with your UPS account. No extra software is needed. You can cover the whole shipping process directly from your UPS WooCommerce environment.
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitad64371326e4ceae5e5911f45824f78b::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInita220145be0a1484399e73611cd5b9445::getLoader();
vendor/composer/autoload_classmap.php CHANGED
@@ -117,6 +117,7 @@ return array(
117
  'Money\\Exception\\UnknownCurrencyException' => $vendorDir . '/moneyphp/money/src/Exception/UnknownCurrencyException.php',
118
  'Money\\Exception\\UnresolvableCurrencyPairException' => $vendorDir . '/moneyphp/money/src/Exception/UnresolvableCurrencyPairException.php',
119
  'Money\\Exchange' => $vendorDir . '/moneyphp/money/src/Exchange.php',
 
120
  'Money\\Exchange\\FixedExchange' => $vendorDir . '/moneyphp/money/src/Exchange/FixedExchange.php',
121
  'Money\\Exchange\\IndirectExchange' => $vendorDir . '/moneyphp/money/src/Exchange/IndirectExchange.php',
122
  'Money\\Exchange\\ReversedCurrenciesExchange' => $vendorDir . '/moneyphp/money/src/Exchange/ReversedCurrenciesExchange.php',
@@ -127,6 +128,7 @@ return array(
127
  'Money\\Formatter\\IntlLocalizedDecimalFormatter' => $vendorDir . '/moneyphp/money/src/Formatter/IntlLocalizedDecimalFormatter.php',
128
  'Money\\Formatter\\IntlMoneyFormatter' => $vendorDir . '/moneyphp/money/src/Formatter/IntlMoneyFormatter.php',
129
  'Money\\Money' => $vendorDir . '/moneyphp/money/src/Money.php',
 
130
  'Money\\MoneyFormatter' => $vendorDir . '/moneyphp/money/src/MoneyFormatter.php',
131
  'Money\\MoneyParser' => $vendorDir . '/moneyphp/money/src/MoneyParser.php',
132
  'Money\\Number' => $vendorDir . '/moneyphp/money/src/Number.php',
117
  'Money\\Exception\\UnknownCurrencyException' => $vendorDir . '/moneyphp/money/src/Exception/UnknownCurrencyException.php',
118
  'Money\\Exception\\UnresolvableCurrencyPairException' => $vendorDir . '/moneyphp/money/src/Exception/UnresolvableCurrencyPairException.php',
119
  'Money\\Exchange' => $vendorDir . '/moneyphp/money/src/Exchange.php',
120
+ 'Money\\Exchange\\ExchangerExchange' => $vendorDir . '/moneyphp/money/src/Exchange/ExchangerExchange.php',
121
  'Money\\Exchange\\FixedExchange' => $vendorDir . '/moneyphp/money/src/Exchange/FixedExchange.php',
122
  'Money\\Exchange\\IndirectExchange' => $vendorDir . '/moneyphp/money/src/Exchange/IndirectExchange.php',
123
  'Money\\Exchange\\ReversedCurrenciesExchange' => $vendorDir . '/moneyphp/money/src/Exchange/ReversedCurrenciesExchange.php',
128
  'Money\\Formatter\\IntlLocalizedDecimalFormatter' => $vendorDir . '/moneyphp/money/src/Formatter/IntlLocalizedDecimalFormatter.php',
129
  'Money\\Formatter\\IntlMoneyFormatter' => $vendorDir . '/moneyphp/money/src/Formatter/IntlMoneyFormatter.php',
130
  'Money\\Money' => $vendorDir . '/moneyphp/money/src/Money.php',
131
+ 'Money\\MoneyFactory' => $vendorDir . '/moneyphp/money/src/MoneyFactory.php',
132
  'Money\\MoneyFormatter' => $vendorDir . '/moneyphp/money/src/MoneyFormatter.php',
133
  'Money\\MoneyParser' => $vendorDir . '/moneyphp/money/src/MoneyParser.php',
134
  'Money\\Number' => $vendorDir . '/moneyphp/money/src/Number.php',
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitad64371326e4ceae5e5911f45824f78b
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitad64371326e4ceae5e5911f45824f78b
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitad64371326e4ceae5e5911f45824f78b', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitad64371326e4ceae5e5911f45824f78b', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInitad64371326e4ceae5e5911f45824f78b::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInitad64371326e4ceae5e5911f45824f78b
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInitad64371326e4ceae5e5911f45824f78b::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequiread64371326e4ceae5e5911f45824f78b($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequiread64371326e4ceae5e5911f45824f78b($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInita220145be0a1484399e73611cd5b9445
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInita220145be0a1484399e73611cd5b9445', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInita220145be0a1484399e73611cd5b9445', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInita220145be0a1484399e73611cd5b9445::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInita220145be0a1484399e73611cd5b9445::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequirea220145be0a1484399e73611cd5b9445($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequirea220145be0a1484399e73611cd5b9445($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitad64371326e4ceae5e5911f45824f78b
8
  {
9
  public static $files = array (
10
  '46ae4ad8c3479aabff48f598a0e4b93f' => __DIR__ . '/..' . '/wpdesk/wp-mutex/src/WPDesk/functions.php',
@@ -196,6 +196,7 @@ class ComposerStaticInitad64371326e4ceae5e5911f45824f78b
196
  'Money\\Exception\\UnknownCurrencyException' => __DIR__ . '/..' . '/moneyphp/money/src/Exception/UnknownCurrencyException.php',
197
  'Money\\Exception\\UnresolvableCurrencyPairException' => __DIR__ . '/..' . '/moneyphp/money/src/Exception/UnresolvableCurrencyPairException.php',
198
  'Money\\Exchange' => __DIR__ . '/..' . '/moneyphp/money/src/Exchange.php',
 
199
  'Money\\Exchange\\FixedExchange' => __DIR__ . '/..' . '/moneyphp/money/src/Exchange/FixedExchange.php',
200
  'Money\\Exchange\\IndirectExchange' => __DIR__ . '/..' . '/moneyphp/money/src/Exchange/IndirectExchange.php',
201
  'Money\\Exchange\\ReversedCurrenciesExchange' => __DIR__ . '/..' . '/moneyphp/money/src/Exchange/ReversedCurrenciesExchange.php',
@@ -206,6 +207,7 @@ class ComposerStaticInitad64371326e4ceae5e5911f45824f78b
206
  'Money\\Formatter\\IntlLocalizedDecimalFormatter' => __DIR__ . '/..' . '/moneyphp/money/src/Formatter/IntlLocalizedDecimalFormatter.php',
207
  'Money\\Formatter\\IntlMoneyFormatter' => __DIR__ . '/..' . '/moneyphp/money/src/Formatter/IntlMoneyFormatter.php',
208
  'Money\\Money' => __DIR__ . '/..' . '/moneyphp/money/src/Money.php',
 
209
  'Money\\MoneyFormatter' => __DIR__ . '/..' . '/moneyphp/money/src/MoneyFormatter.php',
210
  'Money\\MoneyParser' => __DIR__ . '/..' . '/moneyphp/money/src/MoneyParser.php',
211
  'Money\\Number' => __DIR__ . '/..' . '/moneyphp/money/src/Number.php',
@@ -590,9 +592,9 @@ class ComposerStaticInitad64371326e4ceae5e5911f45824f78b
590
  public static function getInitializer(ClassLoader $loader)
591
  {
592
  return \Closure::bind(function () use ($loader) {
593
- $loader->prefixLengthsPsr4 = ComposerStaticInitad64371326e4ceae5e5911f45824f78b::$prefixLengthsPsr4;
594
- $loader->prefixDirsPsr4 = ComposerStaticInitad64371326e4ceae5e5911f45824f78b::$prefixDirsPsr4;
595
- $loader->classMap = ComposerStaticInitad64371326e4ceae5e5911f45824f78b::$classMap;
596
 
597
  }, null, ClassLoader::class);
598
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInita220145be0a1484399e73611cd5b9445
8
  {
9
  public static $files = array (
10
  '46ae4ad8c3479aabff48f598a0e4b93f' => __DIR__ . '/..' . '/wpdesk/wp-mutex/src/WPDesk/functions.php',
196
  'Money\\Exception\\UnknownCurrencyException' => __DIR__ . '/..' . '/moneyphp/money/src/Exception/UnknownCurrencyException.php',
197
  'Money\\Exception\\UnresolvableCurrencyPairException' => __DIR__ . '/..' . '/moneyphp/money/src/Exception/UnresolvableCurrencyPairException.php',
198
  'Money\\Exchange' => __DIR__ . '/..' . '/moneyphp/money/src/Exchange.php',
199
+ 'Money\\Exchange\\ExchangerExchange' => __DIR__ . '/..' . '/moneyphp/money/src/Exchange/ExchangerExchange.php',
200
  'Money\\Exchange\\FixedExchange' => __DIR__ . '/..' . '/moneyphp/money/src/Exchange/FixedExchange.php',
201
  'Money\\Exchange\\IndirectExchange' => __DIR__ . '/..' . '/moneyphp/money/src/Exchange/IndirectExchange.php',
202
  'Money\\Exchange\\ReversedCurrenciesExchange' => __DIR__ . '/..' . '/moneyphp/money/src/Exchange/ReversedCurrenciesExchange.php',
207
  'Money\\Formatter\\IntlLocalizedDecimalFormatter' => __DIR__ . '/..' . '/moneyphp/money/src/Formatter/IntlLocalizedDecimalFormatter.php',
208
  'Money\\Formatter\\IntlMoneyFormatter' => __DIR__ . '/..' . '/moneyphp/money/src/Formatter/IntlMoneyFormatter.php',
209
  'Money\\Money' => __DIR__ . '/..' . '/moneyphp/money/src/Money.php',
210
+ 'Money\\MoneyFactory' => __DIR__ . '/..' . '/moneyphp/money/src/MoneyFactory.php',
211
  'Money\\MoneyFormatter' => __DIR__ . '/..' . '/moneyphp/money/src/MoneyFormatter.php',
212
  'Money\\MoneyParser' => __DIR__ . '/..' . '/moneyphp/money/src/MoneyParser.php',
213
  'Money\\Number' => __DIR__ . '/..' . '/moneyphp/money/src/Number.php',
592
  public static function getInitializer(ClassLoader $loader)
593
  {
594
  return \Closure::bind(function () use ($loader) {
595
+ $loader->prefixLengthsPsr4 = ComposerStaticInita220145be0a1484399e73611cd5b9445::$prefixLengthsPsr4;
596
+ $loader->prefixDirsPsr4 = ComposerStaticInita220145be0a1484399e73611cd5b9445::$prefixDirsPsr4;
597
+ $loader->classMap = ComposerStaticInita220145be0a1484399e73611cd5b9445::$classMap;
598
 
599
  }, null, ClassLoader::class);
600
  }
vendor/composer/installed.json CHANGED
@@ -123,17 +123,17 @@
123
  },
124
  {
125
  "name": "moneyphp/money",
126
- "version": "v3.1.3",
127
- "version_normalized": "3.1.3.0",
128
  "source": {
129
  "type": "git",
130
  "url": "https://github.com/moneyphp/money.git",
131
- "reference": "5e6a3c98ba2cb190d48d35656967eacf30716034"
132
  },
133
  "dist": {
134
  "type": "zip",
135
- "url": "https://api.github.com/repos/moneyphp/money/zipball/5e6a3c98ba2cb190d48d35656967eacf30716034",
136
- "reference": "5e6a3c98ba2cb190d48d35656967eacf30716034",
137
  "shasum": ""
138
  },
139
  "require": {
@@ -145,25 +145,26 @@
145
  "ext-bcmath": "*",
146
  "ext-gmp": "*",
147
  "ext-intl": "*",
 
148
  "florianv/swap": "^3.0",
149
  "leanphp/phpspec-code-coverage": "^3.0 || ^4.0",
150
  "moneyphp/iso-currencies": "^3.0",
151
  "php-http/message": "^1.4",
152
- "php-http/mock-client": "^0.3.3",
153
  "phpspec/phpspec": "^3.0",
154
- "phpunit/phpunit": "^5",
155
  "psr/cache": "^1.0",
156
- "sllh/php-cs-fixer-styleci-bridge": "^2.1",
157
  "symfony/phpunit-bridge": "^4"
158
  },
159
  "suggest": {
160
  "ext-bcmath": "Calculate without integer limits",
161
  "ext-gmp": "Calculate without integer limits",
162
  "ext-intl": "Format Money objects with intl",
 
163
  "florianv/swap": "Exchange rates library for PHP",
164
  "psr/cache-implementation": "Used for Currency caching"
165
  },
166
- "time": "2018-02-16T11:04:16+00:00",
167
  "type": "library",
168
  "extra": {
169
  "branch-alias": {
@@ -181,6 +182,10 @@
181
  "MIT"
182
  ],
183
  "authors": [
 
 
 
 
184
  {
185
  "name": "Mathias Verraes",
186
  "email": "mathias@verraes.net",
@@ -189,14 +194,10 @@
189
  {
190
  "name": "Frederik Bosch",
191
  "email": "f.bosch@genkgo.nl"
192
- },
193
- {
194
- "name": "Márk Sági-Kazár",
195
- "email": "mark.sagi-kazar@gmail.com"
196
  }
197
  ],
198
  "description": "PHP implementation of Fowler's Money pattern",
199
- "homepage": "http://verraes.net/2011/04/fowler-money-pattern-in-php/",
200
  "keywords": [
201
  "Value Object",
202
  "money",
@@ -663,17 +664,17 @@
663
  },
664
  {
665
  "name": "wpdesk/wp-saas-platform-client",
666
- "version": "1.5.1",
667
- "version_normalized": "1.5.1.0",
668
  "source": {
669
  "type": "git",
670
  "url": "https://gitlab.com/wpdesk/wp-saas-platform-client.git",
671
- "reference": "e3669bd609727c8e5ed5568b9140e1b85469738d"
672
  },
673
  "dist": {
674
  "type": "zip",
675
- "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-saas-platform-client/repository/archive.zip?sha=e3669bd609727c8e5ed5568b9140e1b85469738d",
676
- "reference": "e3669bd609727c8e5ed5568b9140e1b85469738d",
677
  "shasum": ""
678
  },
679
  "require": {
@@ -690,7 +691,7 @@
690
  "wimg/php-compatibility": "^8",
691
  "wp-coding-standards/wpcs": "^0.14.1"
692
  },
693
- "time": "2018-11-16T12:09:19+00:00",
694
  "type": "library",
695
  "installation-source": "dist",
696
  "autoload": {
123
  },
124
  {
125
  "name": "moneyphp/money",
126
+ "version": "v3.2.0",
127
+ "version_normalized": "3.2.0.0",
128
  "source": {
129
  "type": "git",
130
  "url": "https://github.com/moneyphp/money.git",
131
+ "reference": "53ce6e4b9a2aac6e5194a0a633b7a556a6b04b07"
132
  },
133
  "dist": {
134
  "type": "zip",
135
+ "url": "https://api.github.com/repos/moneyphp/money/zipball/53ce6e4b9a2aac6e5194a0a633b7a556a6b04b07",
136
+ "reference": "53ce6e4b9a2aac6e5194a0a633b7a556a6b04b07",
137
  "shasum": ""
138
  },
139
  "require": {
145
  "ext-bcmath": "*",
146
  "ext-gmp": "*",
147
  "ext-intl": "*",
148
+ "florianv/exchanger": "^1.0",
149
  "florianv/swap": "^3.0",
150
  "leanphp/phpspec-code-coverage": "^3.0 || ^4.0",
151
  "moneyphp/iso-currencies": "^3.0",
152
  "php-http/message": "^1.4",
153
+ "php-http/mock-client": "^1.0.0",
154
  "phpspec/phpspec": "^3.0",
155
+ "phpunit/phpunit": "^5.7 || ^6.4 || ^7.0",
156
  "psr/cache": "^1.0",
 
157
  "symfony/phpunit-bridge": "^4"
158
  },
159
  "suggest": {
160
  "ext-bcmath": "Calculate without integer limits",
161
  "ext-gmp": "Calculate without integer limits",
162
  "ext-intl": "Format Money objects with intl",
163
+ "florianv/exchanger": "Exchange rates library for PHP",
164
  "florianv/swap": "Exchange rates library for PHP",
165
  "psr/cache-implementation": "Used for Currency caching"
166
  },
167
+ "time": "2018-12-05T12:17:01+00:00",
168
  "type": "library",
169
  "extra": {
170
  "branch-alias": {
182
  "MIT"
183
  ],
184
  "authors": [
185
+ {
186
+ "name": "Márk Sági-Kazár",
187
+ "email": "mark.sagikazar@gmail.com"
188
+ },
189
  {
190
  "name": "Mathias Verraes",
191
  "email": "mathias@verraes.net",
194
  {
195
  "name": "Frederik Bosch",
196
  "email": "f.bosch@genkgo.nl"
 
 
 
 
197
  }
198
  ],
199
  "description": "PHP implementation of Fowler's Money pattern",
200
+ "homepage": "http://moneyphp.org",
201
  "keywords": [
202
  "Value Object",
203
  "money",
664
  },
665
  {
666
  "name": "wpdesk/wp-saas-platform-client",
667
+ "version": "1.6",
668
+ "version_normalized": "1.6.0.0",
669
  "source": {
670
  "type": "git",
671
  "url": "https://gitlab.com/wpdesk/wp-saas-platform-client.git",
672
+ "reference": "ff5d41ccb351d4dd2f281998cb9f87c46474c14b"
673
  },
674
  "dist": {
675
  "type": "zip",
676
+ "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-saas-platform-client/repository/archive.zip?sha=ff5d41ccb351d4dd2f281998cb9f87c46474c14b",
677
+ "reference": "ff5d41ccb351d4dd2f281998cb9f87c46474c14b",
678
  "shasum": ""
679
  },
680
  "require": {
691
  "wimg/php-compatibility": "^8",
692
  "wp-coding-standards/wpcs": "^0.14.1"
693
  },
694
+ "time": "2018-12-06T17:38:11+00:00",
695
  "type": "library",
696
  "installation-source": "dist",
697
  "autoload": {
vendor/moneyphp/money/.scrutinizer.yml DELETED
@@ -1,9 +0,0 @@
1
- filter:
2
- paths: [src/*]
3
- checks:
4
- php:
5
- code_rating: true
6
- duplication: true
7
- tools:
8
- external_code_coverage:
9
- runs: 2
 
 
 
 
 
 
 
 
 
vendor/moneyphp/money/CHANGELOG.md CHANGED
@@ -10,6 +10,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
10
  ## [Unreleased]
11
 
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  ## [3.1.3] - 2018-02-16
14
 
15
  ### Fixed
@@ -281,7 +299,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
281
  - 2012-12-10 Renamed Money::getUnits() to Money::getAmount()
282
 
283
 
284
- [Unreleased]: https://github.com/moneyphp/money/compare/v3.1.3...HEAD
 
285
  [3.1.3]: https://github.com/moneyphp/money/compare/v3.1.2...v3.1.3
286
  [3.1.2]: https://github.com/moneyphp/money/compare/v3.1.1...v3.1.2
287
  [3.1.1]: https://github.com/moneyphp/money/compare/v3.1.0...v3.1.1
10
  ## [Unreleased]
11
 
12
 
13
+ ## [3.2.0] - 2018-12-05
14
+
15
+ ### Added
16
+
17
+ - [Exchanger](https://github.com/florianv/exchanger) exchange
18
+ - Generated static factory to help IDEs understand code like `Money::EUR(500)`
19
+ - Aggregation functions (min, max, avg, sum)
20
+
21
+ ### Changed
22
+
23
+ - `Money::add` and `Money::subtract` now accept variadic arguments
24
+
25
+ ### Fixed
26
+
27
+ - Division causing unnecessary fractional parts
28
+ - Numeric comparison for negative numbers
29
+
30
+
31
  ## [3.1.3] - 2018-02-16
32
 
33
  ### Fixed
299
  - 2012-12-10 Renamed Money::getUnits() to Money::getAmount()
300
 
301
 
302
+ [Unreleased]: https://github.com/moneyphp/money/compare/v3.2.0...HEAD
303
+ [3.2.0]: https://github.com/moneyphp/money/compare/v3.1.3...v3.2.0
304
  [3.1.3]: https://github.com/moneyphp/money/compare/v3.1.2...v3.1.3
305
  [3.1.2]: https://github.com/moneyphp/money/compare/v3.1.1...v3.1.2
306
  [3.1.1]: https://github.com/moneyphp/money/compare/v3.1.0...v3.1.1
vendor/moneyphp/money/LICENSE CHANGED
@@ -1,4 +1,6 @@
1
  Copyright (c) 2011-2016 Mathias Verraes
 
 
2
 
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
  of this software and associated documentation files (the "Software"), to deal
1
  Copyright (c) 2011-2016 Mathias Verraes
2
+ Copyright (c) 2016 Márk Sági-Kazár <mark.sagikazar@gmail.com>
3
+ Copyright (c) 2016 Frederik Bosch <f.bosch@genkgo.nl>
4
 
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
  of this software and associated documentation files (the "Software"), to deal
vendor/moneyphp/money/README.md CHANGED
@@ -40,7 +40,7 @@ The documentation is available at http://moneyphp.org
40
 
41
  PHP 5.6+. Other than that, this library has no external requirements. MoneyPHP will not provide any support to
42
  PHP versions that are [not supported by the language itself](http://php.net/supported-versions.php). There might be
43
- additional dependencies for specific feature, e.g. the swap implementation.
44
 
45
 
46
  ## Install
40
 
41
  PHP 5.6+. Other than that, this library has no external requirements. MoneyPHP will not provide any support to
42
  PHP versions that are [not supported by the language itself](http://php.net/supported-versions.php). There might be
43
+ additional dependencies for specific feature, e.g. the Swap exchange implementation, check the documentation for more information.
44
 
45
 
46
  ## Install
vendor/moneyphp/money/composer.json CHANGED
@@ -1,9 +1,9 @@
1
  {
2
  "name": "moneyphp/money",
3
  "description": "PHP implementation of Fowler's Money pattern",
4
- "keywords": ["money", "vo", "value object"],
5
- "homepage": "http://verraes.net/2011/04/fowler-money-pattern-in-php/",
6
  "license": "MIT",
 
 
7
  "authors": [
8
  {
9
  "name": "Mathias Verraes",
@@ -12,7 +12,7 @@
12
  },
13
  {
14
  "name": "Márk Sági-Kazár",
15
- "email": "mark.sagi-kazar@gmail.com"
16
  },
17
  {
18
  "name": "Frederik Bosch",
@@ -23,11 +23,12 @@
23
  "php": ">=5.6"
24
  },
25
  "require-dev": {
26
- "phpunit/phpunit": "^5",
27
  "symfony/phpunit-bridge": "^4",
28
  "ext-bcmath": "*",
29
  "ext-gmp": "*",
30
  "ext-intl": "*",
 
31
  "florianv/swap": "^3.0",
32
  "psr/cache": "^1.0",
33
  "cache/taggable-cache": "^0.4.0",
@@ -35,15 +36,15 @@
35
  "leanphp/phpspec-code-coverage": "^3.0 || ^4.0",
36
  "doctrine/instantiator": "^1.0.5",
37
  "moneyphp/iso-currencies": "^3.0",
38
- "sllh/php-cs-fixer-styleci-bridge": "^2.1",
39
  "php-http/message": "^1.4",
40
- "php-http/mock-client": "^0.3.3"
41
  },
42
  "suggest": {
43
  "ext-bcmath": "Calculate without integer limits",
44
  "ext-gmp": "Calculate without integer limits",
45
  "ext-intl": "Format Money objects with intl",
46
  "florianv/swap": "Exchange rates library for PHP",
 
47
  "psr/cache-implementation": "Used for Currency caching"
48
  },
49
  "autoload": {
@@ -57,20 +58,29 @@
57
  "spec\\Money\\": "spec/"
58
  }
59
  },
 
 
 
60
  "scripts": {
 
61
  "test": [
62
  "vendor/bin/phpspec run",
63
  "vendor/bin/phpunit -v"
64
  ],
65
- "test-ci": [
66
  "vendor/bin/phpspec run -c phpspec.ci.yml",
67
  "vendor/bin/phpunit -v --coverage-text --coverage-clover=build/unit_coverage.xml"
68
  ],
69
- "update-currencies": "cp vendor/moneyphp/iso-currencies/resources/current.php resources/currency.php"
 
 
 
70
  },
71
  "extra": {
72
  "branch-alias": {
73
  "dev-master": "3.0-dev"
74
  }
75
- }
 
 
76
  }
1
  {
2
  "name": "moneyphp/money",
3
  "description": "PHP implementation of Fowler's Money pattern",
 
 
4
  "license": "MIT",
5
+ "keywords": ["money", "vo", "value object"],
6
+ "homepage": "http://moneyphp.org",
7
  "authors": [
8
  {
9
  "name": "Mathias Verraes",
12
  },
13
  {
14
  "name": "Márk Sági-Kazár",
15
+ "email": "mark.sagikazar@gmail.com"
16
  },
17
  {
18
  "name": "Frederik Bosch",
23
  "php": ">=5.6"
24
  },
25
  "require-dev": {
26
+ "phpunit/phpunit": "^5.7 || ^6.4 || ^7.0",
27
  "symfony/phpunit-bridge": "^4",
28
  "ext-bcmath": "*",
29
  "ext-gmp": "*",
30
  "ext-intl": "*",
31
+ "florianv/exchanger": "^1.0",
32
  "florianv/swap": "^3.0",
33
  "psr/cache": "^1.0",
34
  "cache/taggable-cache": "^0.4.0",
36
  "leanphp/phpspec-code-coverage": "^3.0 || ^4.0",
37
  "doctrine/instantiator": "^1.0.5",
38
  "moneyphp/iso-currencies": "^3.0",
 
39
  "php-http/message": "^1.4",
40
+ "php-http/mock-client": "^1.0.0"
41
  },
42
  "suggest": {
43
  "ext-bcmath": "Calculate without integer limits",
44
  "ext-gmp": "Calculate without integer limits",
45
  "ext-intl": "Format Money objects with intl",
46
  "florianv/swap": "Exchange rates library for PHP",
47
+ "florianv/exchanger": "Exchange rates library for PHP",
48
  "psr/cache-implementation": "Used for Currency caching"
49
  },
50
  "autoload": {
58
  "spec\\Money\\": "spec/"
59
  }
60
  },
61
+ "config": {
62
+ "sort-packages": true
63
+ },
64
  "scripts": {
65
+ "clean": "rm -rf build/ vendor/",
66
  "test": [
67
  "vendor/bin/phpspec run",
68
  "vendor/bin/phpunit -v"
69
  ],
70
+ "test-coverage": [
71
  "vendor/bin/phpspec run -c phpspec.ci.yml",
72
  "vendor/bin/phpunit -v --coverage-text --coverage-clover=build/unit_coverage.xml"
73
  ],
74
+ "update-currencies": [
75
+ "cp vendor/moneyphp/iso-currencies/resources/current.php resources/currency.php",
76
+ "php resources/generate-money-factory.php"
77
+ ]
78
  },
79
  "extra": {
80
  "branch-alias": {
81
  "dev-master": "3.0-dev"
82
  }
83
+ },
84
+ "prefer-stable": true,
85
+ "minimum-stability": "dev"
86
  }
vendor/moneyphp/money/resources/currency.php CHANGED
@@ -699,12 +699,12 @@
699
  'minorUnit' => 2,
700
  'numericCode' => 462,
701
  ),
702
- 'MRO' =>
703
  array (
704
- 'alphabeticCode' => 'MRO',
705
  'currency' => 'Ouguiya',
706
  'minorUnit' => 2,
707
- 'numericCode' => 478,
708
  ),
709
  'MUR' =>
710
  array (
@@ -842,7 +842,7 @@
842
  'PHP' =>
843
  array (
844
  'alphabeticCode' => 'PHP',
845
- 'currency' => 'Philippine Peso',
846
  'minorUnit' => 2,
847
  'numericCode' => 608,
848
  ),
@@ -895,12 +895,12 @@
895
  'minorUnit' => 2,
896
  'numericCode' => 882,
897
  ),
898
- 'STD' =>
899
  array (
900
- 'alphabeticCode' => 'STD',
901
  'currency' => 'Dobra',
902
  'minorUnit' => 2,
903
- 'numericCode' => 678,
904
  ),
905
  'SAR' =>
906
  array (
699
  'minorUnit' => 2,
700
  'numericCode' => 462,
701
  ),
702
+ 'MRU' =>
703
  array (
704
+ 'alphabeticCode' => 'MRU',
705
  'currency' => 'Ouguiya',
706
  'minorUnit' => 2,
707
+ 'numericCode' => 929,
708
  ),
709
  'MUR' =>
710
  array (
842
  'PHP' =>
843
  array (
844
  'alphabeticCode' => 'PHP',
845
+ 'currency' => 'Philippine Piso',
846
  'minorUnit' => 2,
847
  'numericCode' => 608,
848
  ),
895
  'minorUnit' => 2,
896
  'numericCode' => 882,
897
  ),
898
+ 'STN' =>
899
  array (
900
+ 'alphabeticCode' => 'STN',
901
  'currency' => 'Dobra',
902
  'minorUnit' => 2,
903
+ 'numericCode' => 930,
904
  ),
905
  'SAR' =>
906
  array (
vendor/moneyphp/money/resources/generate-money-factory.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require __DIR__.'/../vendor/autoload.php';
4
+
5
+ use Money\Currencies;
6
+
7
+ $buffer = <<<PHP
8
+ <?php
9
+
10
+ namespace Money;
11
+
12
+ /**
13
+ * This is a generated file. Do not edit it manually!
14
+ *
15
+ PHPDOC
16
+ */
17
+ trait MoneyFactory
18
+ {
19
+ /**
20
+ * Convenience factory method for a Money object.
21
+ *
22
+ * <code>
23
+ * \$fiveDollar = Money::USD(500);
24
+ * </code>
25
+ *
26
+ * @param string \$method
27
+ * @param array \$arguments
28
+ *
29
+ * @return Money
30
+ *
31
+ * @throws \InvalidArgumentException If amount is not integer(ish)
32
+ */
33
+ public static function __callStatic(\$method, \$arguments)
34
+ {
35
+ return new Money(\$arguments[0], new Currency(\$method));
36
+ }
37
+ }
38
+
39
+ PHP;
40
+
41
+ $methodBuffer = '';
42
+
43
+ $currencies = new Currencies\AggregateCurrencies([
44
+ new Currencies\ISOCurrencies(),
45
+ new Currencies\BitcoinCurrencies(),
46
+ ]);
47
+
48
+ $currencies = iterator_to_array($currencies);
49
+
50
+ usort($currencies, function (\Money\Currency $a, \Money\Currency $b) {
51
+ return strcmp($a->getCode(), $b->getCode());
52
+ });
53
+
54
+ /** @var \Money\Currency[] $currencies */
55
+ foreach ($currencies as $currency) {
56
+ $methodBuffer .= sprintf(" * @method static Money %s(string \$amount)\n", $currency->getCode());
57
+ }
58
+
59
+ $buffer = str_replace('PHPDOC', rtrim($methodBuffer), $buffer);
60
+
61
+ file_put_contents(__DIR__.'/../src/MoneyFactory.php', $buffer);
vendor/moneyphp/money/src/Calculator.php CHANGED
@@ -107,9 +107,9 @@ interface Calculator
107
  /**
108
  * Share amount among ratio / total portions.
109
  *
110
- * @param string $amount
111
- * @param int|float $ratio
112
- * @param int|float $total
113
  *
114
  * @return string
115
  */
107
  /**
108
  * Share amount among ratio / total portions.
109
  *
110
+ * @param string $amount
111
+ * @param int|float|string $ratio
112
+ * @param int|float|string $total
113
  *
114
  * @return string
115
  */
vendor/moneyphp/money/src/Calculator/PhpCalculator.php CHANGED
@@ -60,7 +60,7 @@ final class PhpCalculator implements Calculator
60
 
61
  $this->assertIntegerBounds($result);
62
 
63
- return $this->castString($result);
64
  }
65
 
66
  /**
@@ -72,7 +72,7 @@ final class PhpCalculator implements Calculator
72
 
73
  $this->assertIntegerBounds($result);
74
 
75
- return $this->castString($result);
76
  }
77
 
78
  /**
@@ -194,20 +194,4 @@ final class PhpCalculator implements Calculator
194
  throw new \UnexpectedValueException('The result of arithmetic operation is not an integer');
195
  }
196
  }
197
-
198
- /**
199
- * Casts an amount to string ensuring that the decimal separator is dot regardless of the locale.
200
- *
201
- * @param int|float $amount
202
- *
203
- * @return string
204
- */
205
- private function castString($amount)
206
- {
207
- if (is_float($amount)) {
208
- return sprintf('%.14F', $amount);
209
- }
210
-
211
- return (string) $amount;
212
- }
213
  }
60
 
61
  $this->assertIntegerBounds($result);
62
 
63
+ return (string) Number::fromNumber($result);
64
  }
65
 
66
  /**
72
 
73
  $this->assertIntegerBounds($result);
74
 
75
+ return (string) Number::fromNumber($result);
76
  }
77
 
78
  /**
194
  throw new \UnexpectedValueException('The result of arithmetic operation is not an integer');
195
  }
196
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  }
vendor/moneyphp/money/src/Currency.php CHANGED
@@ -69,7 +69,7 @@ final class Currency implements \JsonSerializable
69
  */
70
  public function __toString()
71
  {
72
- return $this->getCode();
73
  }
74
 
75
  /**
69
  */
70
  public function __toString()
71
  {
72
+ return $this->code;
73
  }
74
 
75
  /**
vendor/moneyphp/money/src/Exchange/ExchangerExchange.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Money\Exchange;
4
+
5
+ use Exchanger\CurrencyPair as ExchangerCurrencyPair;
6
+ use Exchanger\Contract\ExchangeRateProvider;
7
+ use Exchanger\Exception\Exception as ExchangerException;
8
+ use Exchanger\ExchangeRateQuery;
9
+ use Money\Currency;
10
+ use Money\CurrencyPair;
11
+ use Money\Exception\UnresolvableCurrencyPairException;
12
+ use Money\Exchange;
13
+
14
+ /**
15
+ * Provides a way to get exchange rate from a third-party source and return a currency pair.
16
+ *
17
+ * @author Maksim (Ellrion) Platonov <ellrion11@gmail.com>
18
+ */
19
+ final class ExchangerExchange implements Exchange
20
+ {
21
+ /**
22
+ * @var ExchangeRateProvider
23
+ */
24
+ private $exchanger;
25
+
26
+ /**
27
+ * @param ExchangeRateProvider $exchanger
28
+ */
29
+ public function __construct(ExchangeRateProvider $exchanger)
30
+ {
31
+ $this->exchanger = $exchanger;
32
+ }
33
+
34
+ /**
35
+ * {@inheritdoc}
36
+ */
37
+ public function quote(Currency $baseCurrency, Currency $counterCurrency)
38
+ {
39
+ try {
40
+ $query = new ExchangeRateQuery(
41
+ new ExchangerCurrencyPair($baseCurrency->getCode(), $counterCurrency->getCode())
42
+ );
43
+ $rate = $this->exchanger->getExchangeRate($query);
44
+ } catch (ExchangerException $e) {
45
+ throw UnresolvableCurrencyPairException::createFromCurrencies($baseCurrency, $counterCurrency);
46
+ }
47
+
48
+ return new CurrencyPair($baseCurrency, $counterCurrency, $rate->getValue());
49
+ }
50
+ }
vendor/moneyphp/money/src/Money.php CHANGED
@@ -13,6 +13,8 @@ use Money\Calculator\PhpCalculator;
13
  */
14
  final class Money implements \JsonSerializable
15
  {
 
 
16
  const ROUND_HALF_UP = PHP_ROUND_HALF_UP;
17
 
18
  const ROUND_HALF_DOWN = PHP_ROUND_HALF_DOWN;
@@ -76,25 +78,6 @@ final class Money implements \JsonSerializable
76
  $this->currency = $currency;
77
  }
78
 
79
- /**
80
- * Convenience factory method for a Money object.
81
- *
82
- * <code>
83
- * $fiveDollar = Money::USD(500);
84
- * </code>
85
- *
86
- * @param string $method
87
- * @param array $arguments
88
- *
89
- * @return Money
90
- *
91
- * @throws \InvalidArgumentException If amount is not integer
92
- */
93
- public static function __callStatic($method, $arguments)
94
- {
95
- return new self($arguments[0], new Currency($method));
96
- }
97
-
98
  /**
99
  * Returns a new Money instance based on the current one using the Currency.
100
  *
@@ -172,7 +155,7 @@ final class Money implements \JsonSerializable
172
  */
173
  public function greaterThan(Money $other)
174
  {
175
- return $this->compare($other) === 1;
176
  }
177
 
178
  /**
@@ -194,7 +177,7 @@ final class Money implements \JsonSerializable
194
  */
195
  public function lessThan(Money $other)
196
  {
197
- return $this->compare($other) === -1;
198
  }
199
 
200
  /**
@@ -231,30 +214,44 @@ final class Money implements \JsonSerializable
231
  * Returns a new Money object that represents
232
  * the sum of this and an other Money object.
233
  *
234
- * @param Money $addend
235
  *
236
  * @return Money
237
  */
238
- public function add(Money $addend)
239
  {
240
- $this->assertSameCurrency($addend);
 
 
 
 
 
 
 
241
 
242
- return new self($this->getCalculator()->add($this->amount, $addend->amount), $this->currency);
243
  }
244
 
245
  /**
246
  * Returns a new Money object that represents
247
  * the difference of this and an other Money object.
248
  *
249
- * @param Money $subtrahend
250
  *
251
  * @return Money
252
  */
253
- public function subtract(Money $subtrahend)
254
  {
255
- $this->assertSameCurrency($subtrahend);
 
256
 
257
- return new self($this->getCalculator()->subtract($this->amount, $subtrahend->amount), $this->currency);
 
 
 
 
 
 
258
  }
259
 
260
  /**
@@ -390,7 +387,7 @@ final class Money implements \JsonSerializable
390
  $remainder = $this->getCalculator()->subtract($remainder, $share);
391
  }
392
 
393
- for ($i = 0; $this->getCalculator()->compare($remainder, 0) === 1; ++$i) {
394
  if (!$ratios[$i]) {
395
  continue;
396
  }
@@ -492,7 +489,7 @@ final class Money implements \JsonSerializable
492
  */
493
  public function isPositive()
494
  {
495
- return $this->getCalculator()->compare($this->amount, 0) === 1;
496
  }
497
 
498
  /**
@@ -502,7 +499,7 @@ final class Money implements \JsonSerializable
502
  */
503
  public function isNegative()
504
  {
505
- return $this->getCalculator()->compare($this->amount, 0) === -1;
506
  }
507
 
508
  /**
@@ -518,6 +515,66 @@ final class Money implements \JsonSerializable
518
  ];
519
  }
520
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
521
  /**
522
  * @param string $calculator
523
  */
13
  */
14
  final class Money implements \JsonSerializable
15
  {
16
+ use MoneyFactory;
17
+
18
  const ROUND_HALF_UP = PHP_ROUND_HALF_UP;
19
 
20
  const ROUND_HALF_DOWN = PHP_ROUND_HALF_DOWN;
78
  $this->currency = $currency;
79
  }
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  /**
82
  * Returns a new Money instance based on the current one using the Currency.
83
  *
155
  */
156
  public function greaterThan(Money $other)
157
  {
158
+ return $this->compare($other) > 0;
159
  }
160
 
161
  /**
177
  */
178
  public function lessThan(Money $other)
179
  {
180
+ return $this->compare($other) < 0;
181
  }
182
 
183
  /**
214
  * Returns a new Money object that represents
215
  * the sum of this and an other Money object.
216
  *
217
+ * @param Money[] $addends
218
  *
219
  * @return Money
220
  */
221
+ public function add(Money ...$addends)
222
  {
223
+ $amount = $this->amount;
224
+ $calculator = $this->getCalculator();
225
+
226
+ foreach ($addends as $addend) {
227
+ $this->assertSameCurrency($addend);
228
+
229
+ $amount = $calculator->add($amount, $addend->amount);
230
+ }
231
 
232
+ return new self($amount, $this->currency);
233
  }
234
 
235
  /**
236
  * Returns a new Money object that represents
237
  * the difference of this and an other Money object.
238
  *
239
+ * @param Money[] $subtrahends
240
  *
241
  * @return Money
242
  */
243
+ public function subtract(Money ...$subtrahends)
244
  {
245
+ $amount = $this->amount;
246
+ $calculator = $this->getCalculator();
247
 
248
+ foreach ($subtrahends as $subtrahend) {
249
+ $this->assertSameCurrency($subtrahend);
250
+
251
+ $amount = $calculator->subtract($amount, $subtrahend->amount);
252
+ }
253
+
254
+ return new self($amount, $this->currency);
255
  }
256
 
257
  /**
387
  $remainder = $this->getCalculator()->subtract($remainder, $share);
388
  }
389
 
390
+ for ($i = 0; $this->getCalculator()->compare($remainder, 0) > 0; ++$i) {
391
  if (!$ratios[$i]) {
392
  continue;
393
  }
489
  */
490
  public function isPositive()
491
  {
492
+ return $this->getCalculator()->compare($this->amount, 0) > 0;
493
  }
494
 
495
  /**
499
  */
500
  public function isNegative()
501
  {
502
+ return $this->getCalculator()->compare($this->amount, 0) < 0;
503
  }
504
 
505
  /**
515
  ];
516
  }
517
 
518
+ /**
519
+ * @param Money $first
520
+ * @param Money ...$collection
521
+ *
522
+ * @return Money
523
+ */
524
+ public static function min(self $first, self ...$collection)
525
+ {
526
+ $min = $first;
527
+
528
+ foreach ($collection as $money) {
529
+ if ($money->lessThan($min)) {
530
+ $min = $money;
531
+ }
532
+ }
533
+
534
+ return $min;
535
+ }
536
+
537
+ /**
538
+ * @param Money $first
539
+ * @param Money ...$collection
540
+ *
541
+ * @return Money
542
+ */
543
+ public static function max(self $first, self ...$collection)
544
+ {
545
+ $max = $first;
546
+
547
+ foreach ($collection as $money) {
548
+ if ($money->greaterThan($max)) {
549
+ $max = $money;
550
+ }
551
+ }
552
+
553
+ return $max;
554
+ }
555
+
556
+ /**
557
+ * @param Money $first
558
+ * @param Money ...$collection
559
+ *
560
+ * @return Money
561
+ */
562
+ public static function sum(self $first, self ...$collection)
563
+ {
564
+ return $first->add(...$collection);
565
+ }
566
+
567
+ /**
568
+ * @param Money $first
569
+ * @param Money ...$collection
570
+ *
571
+ * @return Money
572
+ */
573
+ public static function avg(self $first, self ...$collection)
574
+ {
575
+ return $first->add(...$collection)->divide(func_num_args());
576
+ }
577
+
578
  /**
579
  * @param string $calculator
580
  */
vendor/moneyphp/money/src/MoneyFactory.php ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Money;
4
+
5
+ /**
6
+ * This is a generated file. Do not edit it manually!
7
+ *
8
+ * @method static Money AED(string $amount)
9
+ * @method static Money ALL(string $amount)
10
+ * @method static Money AMD(string $amount)
11
+ * @method static Money ANG(string $amount)
12
+ * @method static Money AOA(string $amount)
13
+ * @method static Money ARS(string $amount)
14
+ * @method static Money AUD(string $amount)
15
+ * @method static Money AWG(string $amount)
16
+ * @method static Money AZN(string $amount)
17
+ * @method static Money BAM(string $amount)
18
+ * @method static Money BBD(string $amount)
19
+ * @method static Money BDT(string $amount)
20
+ * @method static Money BGN(string $amount)
21
+ * @method static Money BHD(string $amount)
22
+ * @method static Money BIF(string $amount)
23
+ * @method static Money BMD(string $amount)
24
+ * @method static Money BND(string $amount)
25
+ * @method static Money BOB(string $amount)
26
+ * @method static Money BOV(string $amount)
27
+ * @method static Money BRL(string $amount)
28
+ * @method static Money BSD(string $amount)
29
+ * @method static Money BTN(string $amount)
30
+ * @method static Money BWP(string $amount)
31
+ * @method static Money BYN(string $amount)
32
+ * @method static Money BZD(string $amount)
33
+ * @method static Money CAD(string $amount)
34
+ * @method static Money CDF(string $amount)
35
+ * @method static Money CHE(string $amount)
36
+ * @method static Money CHF(string $amount)
37
+ * @method static Money CHW(string $amount)
38
+ * @method static Money CLF(string $amount)
39
+ * @method static Money CLP(string $amount)
40
+ * @method static Money CNY(string $amount)
41
+ * @method static Money COP(string $amount)
42
+ * @method static Money COU(string $amount)
43
+ * @method static Money CRC(string $amount)
44
+ * @method static Money CUC(string $amount)
45
+ * @method static Money CUP(string $amount)
46
+ * @method static Money CVE(string $amount)
47
+ * @method static Money CZK(string $amount)
48
+ * @method static Money DJF(string $amount)
49
+ * @method static Money DKK(string $amount)
50
+ * @method static Money DOP(string $amount)
51
+ * @method static Money DZD(string $amount)
52
+ * @method static Money EGP(string $amount)
53
+ * @method static Money ERN(string $amount)
54
+ * @method static Money ETB(string $amount)
55
+ * @method static Money EUR(string $amount)
56
+ * @method static Money FJD(string $amount)
57
+ * @method static Money FKP(string $amount)
58
+ * @method static Money GBP(string $amount)
59
+ * @method static Money GEL(string $amount)
60
+ * @method static Money GHS(string $amount)
61
+ * @method static Money GIP(string $amount)
62
+ * @method static Money GMD(string $amount)
63
+ * @method static Money GNF(string $amount)
64
+ * @method static Money GTQ(string $amount)
65
+ * @method static Money GYD(string $amount)
66
+ * @method static Money HKD(string $amount)
67
+ * @method static Money HNL(string $amount)
68
+ * @method static Money HRK(string $amount)
69
+ * @method static Money HTG(string $amount)
70
+ * @method static Money HUF(string $amount)
71
+ * @method static Money IDR(string $amount)
72
+ * @method static Money ILS(string $amount)
73
+ * @method static Money INR(string $amount)
74
+ * @method static Money IQD(string $amount)
75
+ * @method static Money IRR(string $amount)
76
+ * @method static Money ISK(string $amount)
77
+ * @method static Money JMD(string $amount)
78
+ * @method static Money JOD(string $amount)
79
+ * @method static Money JPY(string $amount)
80
+ * @method static Money KES(string $amount)
81
+ * @method static Money KGS(string $amount)
82
+ * @method static Money KHR(string $amount)
83
+ * @method static Money KMF(string $amount)
84
+ * @method static Money KPW(string $amount)
85
+ * @method static Money KRW(string $amount)
86
+ * @method static Money KWD(string $amount)
87
+ * @method static Money KYD(string $amount)
88
+ * @method static Money KZT(string $amount)
89
+ * @method static Money LAK(string $amount)
90
+ * @method static Money LBP(string $amount)
91
+ * @method static Money LKR(string $amount)
92
+ * @method static Money LRD(string $amount)
93
+ * @method static Money LSL(string $amount)
94
+ * @method static Money LYD(string $amount)
95
+ * @method static Money MAD(string $amount)
96
+ * @method static Money MDL(string $amount)
97
+ * @method static Money MGA(string $amount)
98
+ * @method static Money MKD(string $amount)
99
+ * @method static Money MMK(string $amount)
100
+ * @method static Money MNT(string $amount)
101
+ * @method static Money MOP(string $amount)
102
+ * @method static Money MRU(string $amount)
103
+ * @method static Money MUR(string $amount)
104
+ * @method static Money MVR(string $amount)
105
+ * @method static Money MWK(string $amount)
106
+ * @method static Money MXN(string $amount)
107
+ * @method static Money MXV(string $amount)
108
+ * @method static Money MYR(string $amount)
109
+ * @method static Money MZN(string $amount)
110
+ * @method static Money NAD(string $amount)
111
+ * @method static Money NGN(string $amount)
112
+ * @method static Money NIO(string $amount)
113
+ * @method static Money NOK(string $amount)
114
+ * @method static Money NPR(string $amount)
115
+ * @method static Money NZD(string $amount)
116
+ * @method static Money OMR(string $amount)
117
+ * @method static Money PAB(string $amount)
118
+ * @method static Money PEN(string $amount)
119
+ * @method static Money PGK(string $amount)
120
+ * @method static Money PHP(string $amount)
121
+ * @method static Money PKR(string $amount)
122
+ * @method static Money PLN(string $amount)
123
+ * @method static Money PYG(string $amount)
124
+ * @method static Money QAR(string $amount)
125
+ * @method static Money RON(string $amount)
126
+ * @method static Money RSD(string $amount)
127
+ * @method static Money RUB(string $amount)
128
+ * @method static Money RWF(string $amount)
129
+ * @method static Money SAR(string $amount)
130
+ * @method static Money SBD(string $amount)
131
+ * @method static Money SCR(string $amount)
132
+ * @method static Money SDG(string $amount)
133
+ * @method static Money SEK(string $amount)
134
+ * @method static Money SGD(string $amount)
135
+ * @method static Money SHP(string $amount)
136
+ * @method static Money SLL(string $amount)
137
+ * @method static Money SOS(string $amount)
138
+ * @method static Money SRD(string $amount)
139
+ * @method static Money SSP(string $amount)
140
+ * @method static Money STN(string $amount)
141
+ * @method static Money SVC(string $amount)
142
+ * @method static Money SYP(string $amount)
143
+ * @method static Money SZL(string $amount)
144
+ * @method static Money THB(string $amount)
145
+ * @method static Money TJS(string $amount)
146
+ * @method static Money TMT(string $amount)
147
+ * @method static Money TND(string $amount)
148
+ * @method static Money TOP(string $amount)
149
+ * @method static Money TRY(string $amount)
150
+ * @method static Money TTD(string $amount)
151
+ * @method static Money TWD(string $amount)
152
+ * @method static Money TZS(string $amount)
153
+ * @method static Money UAH(string $amount)
154
+ * @method static Money UGX(string $amount)
155
+ * @method static Money USD(string $amount)
156
+ * @method static Money USN(string $amount)
157
+ * @method static Money UYI(string $amount)
158
+ * @method static Money UYU(string $amount)
159
+ * @method static Money UZS(string $amount)
160
+ * @method static Money VEF(string $amount)
161
+ * @method static Money VND(string $amount)
162
+ * @method static Money VUV(string $amount)
163
+ * @method static Money WST(string $amount)
164
+ * @method static Money XAF(string $amount)
165
+ * @method static Money XAG(string $amount)
166
+ * @method static Money XAU(string $amount)
167
+ * @method static Money XBA(string $amount)
168
+ * @method static Money XBB(string $amount)
169
+ * @method static Money XBC(string $amount)
170
+ * @method static Money XBD(string $amount)
171
+ * @method static Money XBT(string $amount)
172
+ * @method static Money XCD(string $amount)
173
+ * @method static Money XDR(string $amount)
174
+ * @method static Money XOF(string $amount)
175
+ * @method static Money XPD(string $amount)
176
+ * @method static Money XPF(string $amount)
177
+ * @method static Money XPT(string $amount)
178
+ * @method static Money XSU(string $amount)
179
+ * @method static Money XTS(string $amount)
180
+ * @method static Money XUA(string $amount)
181
+ * @method static Money XXX(string $amount)
182
+ * @method static Money YER(string $amount)
183
+ * @method static Money ZAR(string $amount)
184
+ * @method static Money ZMW(string $amount)
185
+ * @method static Money ZWL(string $amount)
186
+ */
187
+ trait MoneyFactory
188
+ {
189
+ /**
190
+ * Convenience factory method for a Money object.
191
+ *
192
+ * <code>
193
+ * $fiveDollar = Money::USD(500);
194
+ * </code>
195
+ *
196
+ * @param string $method
197
+ * @param array $arguments
198
+ *
199
+ * @return Money
200
+ *
201
+ * @throws \InvalidArgumentException If amount is not integer(ish)
202
+ */
203
+ public static function __callStatic($method, $arguments)
204
+ {
205
+ return new Money($arguments[0], new Currency($method));
206
+ }
207
+ }
vendor/wpdesk/wp-saas-platform-client/changelog.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+
2
+ = 1.6 - 2018-12-06 =
3
+ * Added default request headers
vendor/wpdesk/wp-saas-platform-client/src/ApiClient/ClientFactory.php CHANGED
@@ -22,7 +22,8 @@ class ClientFactory
22
  $httpClientFactory->createClient($options),
23
  $serializerFactory->createSerializer($options),
24
  $options->getLogger(),
25
- $options->getApiUrl()
 
26
  );
27
 
28
  if ($options->isCachedClient()) {
22
  $httpClientFactory->createClient($options),
23
  $serializerFactory->createSerializer($options),
24
  $options->getLogger(),
25
+ $options->getApiUrl(),
26
+ $options->getDefaultRequestHeaders()
27
  );
28
 
29
  if ($options->isCachedClient()) {
vendor/wpdesk/wp-saas-platform-client/src/ApiClient/ClientImplementation.php CHANGED
@@ -15,7 +15,7 @@ use WPDesk\SaasPlatformClient\Serializer\Serializer;
15
 
16
  class ClientImplementation implements Client, LoggerAwareInterface
17
  {
18
- const CLIENT_VERSION = '1.0';
19
 
20
  const DEFAULT_TIMEOUT = 10;
21
 
@@ -28,22 +28,32 @@ class ClientImplementation implements Client, LoggerAwareInterface
28
  /** @var LoggerInterface */
29
  private $logger;
30
 
31
- /** @var string */
32
  private $apiUrl;
33
 
 
 
 
34
  /**
35
  * Client constructor.
36
  * @param HttpClient $client
37
  * @param Serializer $serializer
38
  * @param LoggerInterface $logger
39
  * @param string $apiUri
 
40
  */
41
- public function __construct(HttpClient $client, Serializer $serializer, LoggerInterface $logger, $apiUri)
42
- {
 
 
 
 
 
43
  $this->client = $client;
44
  $this->serializer = $serializer;
45
  $this->logger = $logger;
46
  $this->apiUrl = $apiUri;
 
47
  }
48
 
49
  /**
@@ -133,6 +143,7 @@ class ClientImplementation implements Client, LoggerAwareInterface
133
  'Accept-Encoding' => '*',
134
  'Content-Type' => $this->serializer->getMime()
135
  );
 
136
  return array_merge($headers, $request->getHeaders());
137
  }
138
 
15
 
16
  class ClientImplementation implements Client, LoggerAwareInterface
17
  {
18
+ const CLIENT_VERSION = '1.6';
19
 
20
  const DEFAULT_TIMEOUT = 10;
21
 
28
  /** @var LoggerInterface */
29
  private $logger;
30
 
31
+ /** @var string */
32
  private $apiUrl;
33
 
34
+ /** @var array */
35
+ private $defaultRequestHeaders;
36
+
37
  /**
38
  * Client constructor.
39
  * @param HttpClient $client
40
  * @param Serializer $serializer
41
  * @param LoggerInterface $logger
42
  * @param string $apiUri
43
+ * @param array $defaultRequestHeaders
44
  */
45
+ public function __construct(
46
+ HttpClient $client,
47
+ Serializer $serializer,
48
+ LoggerInterface $logger,
49
+ $apiUri,
50
+ array $defaultRequestHeaders
51
+ ) {
52
  $this->client = $client;
53
  $this->serializer = $serializer;
54
  $this->logger = $logger;
55
  $this->apiUrl = $apiUri;
56
+ $this->defaultRequestHeaders = $defaultRequestHeaders;
57
  }
58
 
59
  /**
143
  'Accept-Encoding' => '*',
144
  'Content-Type' => $this->serializer->getMime()
145
  );
146
+ $headers = array_merge($this->defaultRequestHeaders, $headers);
147
  return array_merge($headers, $request->getHeaders());
148
  }
149
 
vendor/wpdesk/wp-saas-platform-client/src/PlatformFactoryOptions.php CHANGED
@@ -53,6 +53,12 @@ class PlatformFactoryOptions implements PersistenceOptions, HttpClientOptions, S
53
  */
54
  private $apiMimeType = 'application/json';
55
 
 
 
 
 
 
 
56
 
57
  /**
58
  * PlatformFactoryOptions constructor.
@@ -196,4 +202,22 @@ class PlatformFactoryOptions implements PersistenceOptions, HttpClientOptions, S
196
  return $this->cacheTtl;
197
  }
198
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
  }
53
  */
54
  private $apiMimeType = 'application/json';
55
 
56
+ /**
57
+ * Default request headers - added to each request.
58
+ *
59
+ * @var array
60
+ */
61
+ private $defaultRequestHeaders = array();
62
 
63
  /**
64
  * PlatformFactoryOptions constructor.
202
  return $this->cacheTtl;
203
  }
204
 
205
+ /**
206
+ * @return array
207
+ */
208
+ public function getDefaultRequestHeaders()
209
+ {
210
+ return $this->defaultRequestHeaders;
211
+ }
212
+
213
+ /**
214
+ * @param array $defaultRequestHeaders
215
+ */
216
+ public function setDefaultRequestHeaders($defaultRequestHeaders)
217
+ {
218
+ $this->defaultRequestHeaders = $defaultRequestHeaders;
219
+ }
220
+
221
+
222
+
223
  }