Class: Stripe::V2::Iam::ApiKey
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::V2::Iam::ApiKey
- Defined in:
- lib/stripe/resources/v2/iam/api_key.rb
Overview
An API key is used to authenticate API requests.
Defined Under Namespace
Classes: ManagedBy, PublishableKey, SecretKey
Constant Summary collapse
- OBJECT_NAME =
"v2.iam.api_key"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#created ⇒ Object
readonly
Timestamp when the API key was created.
-
#expires_at ⇒ Object
readonly
Timestamp when the API key expires.
-
#id ⇒ Object
readonly
Unique identifier of the API key.
-
#ip_allowlist ⇒ Object
readonly
List of IP addresses allowed to use this API key.
-
#last_used ⇒ Object
readonly
Timestamp when the API key was last used.
-
#livemode ⇒ Object
readonly
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#managed_by ⇒ Object
readonly
Account that manages this API key (for keys managed by platforms).
-
#name ⇒ Object
readonly
Name of the API key.
-
#note ⇒ Object
readonly
Note or description for the API key.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#publishable_key ⇒ Object
readonly
Token set for a publishable key.
-
#secret_key ⇒ Object
readonly
Token set for a secret key.
-
#status ⇒ Object
readonly
Current status of the API key (e.g., active, expired).
-
#type ⇒ Object
readonly
Type of the API key.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Instance Attribute Details
#created ⇒ Object (readonly)
Timestamp when the API key was created.
87 88 89 |
# File 'lib/stripe/resources/v2/iam/api_key.rb', line 87 def created @created end |
#expires_at ⇒ Object (readonly)
Timestamp when the API key expires.
89 90 91 |
# File 'lib/stripe/resources/v2/iam/api_key.rb', line 89 def expires_at @expires_at end |
#id ⇒ Object (readonly)
Unique identifier of the API key.
91 92 93 |
# File 'lib/stripe/resources/v2/iam/api_key.rb', line 91 def id @id end |
#ip_allowlist ⇒ Object (readonly)
List of IP addresses allowed to use this API key. Addresses use IPv4 protocol, and may be a CIDR range (e.g., [100.10.38.255, 100.10.38.0/24]).
93 94 95 |
# File 'lib/stripe/resources/v2/iam/api_key.rb', line 93 def ip_allowlist @ip_allowlist end |
#last_used ⇒ Object (readonly)
Timestamp when the API key was last used.
95 96 97 |
# File 'lib/stripe/resources/v2/iam/api_key.rb', line 95 def last_used @last_used end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
97 98 99 |
# File 'lib/stripe/resources/v2/iam/api_key.rb', line 97 def livemode @livemode end |
#managed_by ⇒ Object (readonly)
Account that manages this API key (for keys managed by platforms).
99 100 101 |
# File 'lib/stripe/resources/v2/iam/api_key.rb', line 99 def managed_by @managed_by end |
#name ⇒ Object (readonly)
Name of the API key.
101 102 103 |
# File 'lib/stripe/resources/v2/iam/api_key.rb', line 101 def name @name end |
#note ⇒ Object (readonly)
Note or description for the API key.
103 104 105 |
# File 'lib/stripe/resources/v2/iam/api_key.rb', line 103 def note @note end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value of the object field.
105 106 107 |
# File 'lib/stripe/resources/v2/iam/api_key.rb', line 105 def object @object end |
#publishable_key ⇒ Object (readonly)
Token set for a publishable key.
107 108 109 |
# File 'lib/stripe/resources/v2/iam/api_key.rb', line 107 def publishable_key @publishable_key end |
#secret_key ⇒ Object (readonly)
Token set for a secret key.
109 110 111 |
# File 'lib/stripe/resources/v2/iam/api_key.rb', line 109 def secret_key @secret_key end |
#status ⇒ Object (readonly)
Current status of the API key (e.g., active, expired).
111 112 113 |
# File 'lib/stripe/resources/v2/iam/api_key.rb', line 111 def status @status end |
#type ⇒ Object (readonly)
Type of the API key.
113 114 115 |
# File 'lib/stripe/resources/v2/iam/api_key.rb', line 113 def type @type end |
Class Method Details
.field_remappings ⇒ Object
123 124 125 |
# File 'lib/stripe/resources/v2/iam/api_key.rb', line 123 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
115 116 117 118 119 120 121 |
# File 'lib/stripe/resources/v2/iam/api_key.rb', line 115 def self.inner_class_types @inner_class_types = { managed_by: ManagedBy, publishable_key: PublishableKey, secret_key: SecretKey, } end |
.object_name ⇒ Object
10 11 12 |
# File 'lib/stripe/resources/v2/iam/api_key.rb', line 10 def self.object_name "v2.iam.api_key" end |