Class: Stripe::AccountNotice

Inherits:
APIResource show all
Extended by:
Stripe::APIOperations::List
Includes:
Stripe::APIOperations::Save
Defined in:
lib/stripe/resources/account_notice.rb

Overview

A notice to a Connected account. Notice can be sent by Stripe on your behalf or you can opt to send the notices yourself.

See the [guide to send notices](stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) to your connected accounts.

Defined Under Namespace

Classes: Email, LinkedObjects, ListParams, UpdateParams

Constant Summary collapse

OBJECT_NAME =
"account_notice"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods included from Stripe::APIOperations::List

list

Methods included from Stripe::APIOperations::Save

included, #save

Methods inherited from APIResource

class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource

Methods included from Stripe::APIOperations::Request

included

Methods inherited from StripeObject

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #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

#createdObject (readonly)

Time at which the object was created. Measured in seconds since the Unix epoch.



104
105
106
# File 'lib/stripe/resources/account_notice.rb', line 104

def created
  @created
end

#deadlineObject (readonly)

When present, the deadline for sending the notice to meet the relevant regulations.



106
107
108
# File 'lib/stripe/resources/account_notice.rb', line 106

def deadline
  @deadline
end

#emailObject (readonly)

Information about the email when sent.



108
109
110
# File 'lib/stripe/resources/account_notice.rb', line 108

def email
  @email
end

#idObject (readonly)

Unique identifier for the object.



110
111
112
# File 'lib/stripe/resources/account_notice.rb', line 110

def id
  @id
end

#linked_objectsObject (readonly)

Information about objects related to the notice.



112
113
114
# File 'lib/stripe/resources/account_notice.rb', line 112

def linked_objects
  @linked_objects
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



114
115
116
# File 'lib/stripe/resources/account_notice.rb', line 114

def livemode
  @livemode
end

#metadataObject (readonly)

Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.



116
117
118
# File 'lib/stripe/resources/account_notice.rb', line 116

def 
  @metadata
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value.



118
119
120
# File 'lib/stripe/resources/account_notice.rb', line 118

def object
  @object
end

#reasonObject (readonly)

Reason the notice is being sent. The reason determines what copy the notice must contain. See the [regulated customer notices](stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) guide. All reasons might not apply to your integration, and Stripe might add new reasons in the future, so we recommend an internal warning when you receive an unknown reason.



120
121
122
# File 'lib/stripe/resources/account_notice.rb', line 120

def reason
  @reason
end

#sent_atObject (readonly)

Date when the notice was sent. When absent, you must send the notice, update the content of the email and date when it was sent.



122
123
124
# File 'lib/stripe/resources/account_notice.rb', line 122

def sent_at
  @sent_at
end

Class Method Details

.field_remappingsObject



143
144
145
# File 'lib/stripe/resources/account_notice.rb', line 143

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



139
140
141
# File 'lib/stripe/resources/account_notice.rb', line 139

def self.inner_class_types
  @inner_class_types = { email: Email, linked_objects: LinkedObjects }
end

.list(params = {}, opts = {}) ⇒ Object

Retrieves a list of AccountNotice objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first.



125
126
127
# File 'lib/stripe/resources/account_notice.rb', line 125

def self.list(params = {}, opts = {})
  request_stripe_object(method: :get, path: "/v1/account_notices", params: params, opts: opts)
end

.object_nameObject



13
14
15
# File 'lib/stripe/resources/account_notice.rb', line 13

def self.object_name
  "account_notice"
end

.update(account_notice, params = {}, opts = {}) ⇒ Object

Updates an AccountNotice object.



130
131
132
133
134
135
136
137
# File 'lib/stripe/resources/account_notice.rb', line 130

def self.update(, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/account_notices/%<account_notice>s", { account_notice: CGI.escape() }),
    params: params,
    opts: opts
  )
end