Configuration.php
6 months ago
ConnectionToken.php
6 months ago
Location.php
6 months ago
Reader.php
6 months ago
Configuration.php
115 lines
| 1 | <?php |
| 2 | |
| 3 | // File generated from our OpenAPI spec |
| 4 | namespace AmeliaVendor\Stripe\Terminal; |
| 5 | |
| 6 | /** |
| 7 | * A Configurations object represents how features should be configured for terminal readers. |
| 8 | * |
| 9 | * @property string $id Unique identifier for the object. |
| 10 | * @property string $object String representing the object's type. Objects of the same type share the same value. |
| 11 | * @property null|(object{splashscreen?: string|\AmeliaVendor\Stripe\File}&\AmeliaVendor\Stripe\StripeObject) $bbpos_wisepos_e |
| 12 | * @property null|bool $is_account_default Whether this Configuration is the default for your account |
| 13 | * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. |
| 14 | * @property null|string $name String indicating the name of the Configuration object, set by the user |
| 15 | * @property null|(object{enabled: null|bool}&\AmeliaVendor\Stripe\StripeObject) $offline |
| 16 | * @property null|(object{end_hour: int, start_hour: int}&\AmeliaVendor\Stripe\StripeObject) $reboot_window |
| 17 | * @property null|(object{splashscreen?: string|\AmeliaVendor\Stripe\File}&\AmeliaVendor\Stripe\StripeObject) $stripe_s700 |
| 18 | * @property null|(object{aud?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\AmeliaVendor\Stripe\StripeObject), cad?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\AmeliaVendor\Stripe\StripeObject), chf?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\AmeliaVendor\Stripe\StripeObject), czk?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\AmeliaVendor\Stripe\StripeObject), dkk?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\AmeliaVendor\Stripe\StripeObject), eur?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\AmeliaVendor\Stripe\StripeObject), gbp?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\AmeliaVendor\Stripe\StripeObject), hkd?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\AmeliaVendor\Stripe\StripeObject), jpy?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\AmeliaVendor\Stripe\StripeObject), myr?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\AmeliaVendor\Stripe\StripeObject), nok?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\AmeliaVendor\Stripe\StripeObject), nzd?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\AmeliaVendor\Stripe\StripeObject), pln?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\AmeliaVendor\Stripe\StripeObject), sek?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\AmeliaVendor\Stripe\StripeObject), sgd?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\AmeliaVendor\Stripe\StripeObject), usd?: (object{fixed_amounts?: null|int[], percentages?: null|int[], smart_tip_threshold?: int}&\AmeliaVendor\Stripe\StripeObject)}&\AmeliaVendor\Stripe\StripeObject) $tipping |
| 19 | * @property null|(object{splashscreen?: string|\AmeliaVendor\Stripe\File}&\AmeliaVendor\Stripe\StripeObject) $verifone_p400 |
| 20 | * @property null|(object{enterprise_eap_peap?: (object{ca_certificate_file?: string, password: string, ssid: string, username: string}&\AmeliaVendor\Stripe\StripeObject), enterprise_eap_tls?: (object{ca_certificate_file?: string, client_certificate_file: string, private_key_file: string, private_key_file_password?: string, ssid: string}&\AmeliaVendor\Stripe\StripeObject), personal_psk?: (object{password: string, ssid: string}&\AmeliaVendor\Stripe\StripeObject), type: string}&\AmeliaVendor\Stripe\StripeObject) $wifi |
| 21 | */ |
| 22 | class Configuration extends \AmeliaVendor\Stripe\ApiResource |
| 23 | { |
| 24 | const OBJECT_NAME = 'terminal.configuration'; |
| 25 | use \AmeliaVendor\Stripe\ApiOperations\Update; |
| 26 | /** |
| 27 | * Creates a new <code>Configuration</code> object. |
| 28 | * |
| 29 | * @param null|array{bbpos_wisepos_e?: array{splashscreen?: null|string}, expand?: string[], name?: string, offline?: null|array{enabled: bool}, reboot_window?: array{end_hour: int, start_hour: int}, stripe_s700?: array{splashscreen?: null|string}, tipping?: null|array{aud?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, cad?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, chf?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, czk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, dkk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, eur?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, gbp?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, hkd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, jpy?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, myr?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nok?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nzd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, pln?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sek?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sgd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, usd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}}, verifone_p400?: array{splashscreen?: null|string}, wifi?: null|array{enterprise_eap_peap?: array{ca_certificate_file?: string, password: string, ssid: string, username: string}, enterprise_eap_tls?: array{ca_certificate_file?: string, client_certificate_file: string, private_key_file: string, private_key_file_password?: string, ssid: string}, personal_psk?: array{password: string, ssid: string}, type: string}} $params |
| 30 | * @param null|array|string $options |
| 31 | * |
| 32 | * @return Configuration the created resource |
| 33 | * |
| 34 | * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails |
| 35 | */ |
| 36 | public static function create($params = null, $options = null) |
| 37 | { |
| 38 | self::_validateParams($params); |
| 39 | $url = static::classUrl(); |
| 40 | list($response, $opts) = static::_staticRequest('post', $url, $params, $options); |
| 41 | $obj = \AmeliaVendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); |
| 42 | $obj->setLastResponse($response); |
| 43 | return $obj; |
| 44 | } |
| 45 | /** |
| 46 | * Deletes a <code>Configuration</code> object. |
| 47 | * |
| 48 | * @param null|array $params |
| 49 | * @param null|array|string $opts |
| 50 | * |
| 51 | * @return Configuration the deleted resource |
| 52 | * |
| 53 | * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails |
| 54 | */ |
| 55 | public function delete($params = null, $opts = null) |
| 56 | { |
| 57 | self::_validateParams($params); |
| 58 | $url = $this->instanceUrl(); |
| 59 | list($response, $opts) = $this->_request('delete', $url, $params, $opts); |
| 60 | $this->refreshFrom($response, $opts); |
| 61 | return $this; |
| 62 | } |
| 63 | /** |
| 64 | * Returns a list of <code>Configuration</code> objects. |
| 65 | * |
| 66 | * @param null|array{ending_before?: string, expand?: string[], is_account_default?: bool, limit?: int, starting_after?: string} $params |
| 67 | * @param null|array|string $opts |
| 68 | * |
| 69 | * @return \AmeliaVendor\Stripe\Collection<Configuration> of ApiResources |
| 70 | * |
| 71 | * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails |
| 72 | */ |
| 73 | public static function all($params = null, $opts = null) |
| 74 | { |
| 75 | $url = static::classUrl(); |
| 76 | return static::_requestPage($url, \AmeliaVendor\Stripe\Collection::class, $params, $opts); |
| 77 | } |
| 78 | /** |
| 79 | * Retrieves a <code>Configuration</code> object. |
| 80 | * |
| 81 | * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key |
| 82 | * @param null|array|string $opts |
| 83 | * |
| 84 | * @return Configuration |
| 85 | * |
| 86 | * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails |
| 87 | */ |
| 88 | public static function retrieve($id, $opts = null) |
| 89 | { |
| 90 | $opts = \AmeliaVendor\Stripe\Util\RequestOptions::parse($opts); |
| 91 | $instance = new static($id, $opts); |
| 92 | $instance->refresh(); |
| 93 | return $instance; |
| 94 | } |
| 95 | /** |
| 96 | * Updates a new <code>Configuration</code> object. |
| 97 | * |
| 98 | * @param string $id the ID of the resource to update |
| 99 | * @param null|array{bbpos_wisepos_e?: null|array{splashscreen?: null|string}, expand?: string[], name?: string, offline?: null|array{enabled: bool}, reboot_window?: null|array{end_hour: int, start_hour: int}, stripe_s700?: null|array{splashscreen?: null|string}, tipping?: null|array{aud?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, cad?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, chf?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, czk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, dkk?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, eur?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, gbp?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, hkd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, jpy?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, myr?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nok?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, nzd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, pln?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sek?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, sgd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}, usd?: array{fixed_amounts?: int[], percentages?: int[], smart_tip_threshold?: int}}, verifone_p400?: null|array{splashscreen?: null|string}, wifi?: null|array{enterprise_eap_peap?: array{ca_certificate_file?: string, password: string, ssid: string, username: string}, enterprise_eap_tls?: array{ca_certificate_file?: string, client_certificate_file: string, private_key_file: string, private_key_file_password?: string, ssid: string}, personal_psk?: array{password: string, ssid: string}, type: string}} $params |
| 100 | * @param null|array|string $opts |
| 101 | * |
| 102 | * @return Configuration the updated resource |
| 103 | * |
| 104 | * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails |
| 105 | */ |
| 106 | public static function update($id, $params = null, $opts = null) |
| 107 | { |
| 108 | self::_validateParams($params); |
| 109 | $url = static::resourceUrl($id); |
| 110 | list($response, $opts) = static::_staticRequest('post', $url, $params, $opts); |
| 111 | $obj = \AmeliaVendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); |
| 112 | $obj->setLastResponse($response); |
| 113 | return $obj; |
| 114 | } |
| 115 | } |