Class: Dodopayments::Models::IntegrationConfigResponse::DigitalFilesConfig::DigitalFiles::File

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/integration_config_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(files:, external_url: nil, instructions: nil) ⇒ Object

Populated digital-files payload for entitlement read surfaces. Mirrors ‘DigitalProductDelivery` but is sourced from an entitlement’s ‘integration_config` (not a grant) and tags each file with its origin (`legacy` vs `ee`).

Parameters:



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/dodopayments/models/integration_config_response.rb', line 145

class File < Dodopayments::Internal::Type::BaseModel
  # @!attribute download_url
  #
  #   @return [String]
  required :download_url, String

  # @!attribute expires_in
  #   Seconds until `download_url` expires.
  #
  #   @return [Integer]
  required :expires_in, Integer

  # @!attribute file_id
  #
  #   @return [String]
  required :file_id, String

  # @!attribute filename
  #
  #   @return [String]
  required :filename, String

  # @!attribute source
  #   `"legacy"` for files in `product_files`, `"ee"` for files managed by the
  #   Entitlements Engine.
  #
  #   @return [String]
  required :source, String

  # @!attribute content_type
  #
  #   @return [String, nil]
  optional :content_type, String, nil?: true

  # @!attribute file_size
  #
  #   @return [Integer, nil]
  optional :file_size, Integer, nil?: true

  # @!method initialize(download_url:, expires_in:, file_id:, filename:, source:, content_type: nil, file_size: nil)
  #   Some parameter documentations has been truncated, see
  #   {Dodopayments::Models::IntegrationConfigResponse::DigitalFilesConfig::DigitalFiles::File}
  #   for more details.
  #
  #   @param download_url [String]
  #
  #   @param expires_in [Integer] Seconds until `download_url` expires.
  #
  #   @param file_id [String]
  #
  #   @param filename [String]
  #
  #   @param source [String] `"legacy"` for files in `product_files`, `"ee"` for files managed by the
  #
  #   @param content_type [String, nil]
  #
  #   @param file_size [Integer, nil]
end

Instance Attribute Details

#content_typeString?

Returns:

  • (String, nil)


177
# File 'lib/dodopayments/models/integration_config_response.rb', line 177

optional :content_type, String, nil?: true

#download_urlString

Returns:

  • (String)


149
# File 'lib/dodopayments/models/integration_config_response.rb', line 149

required :download_url, String

#expires_inInteger

Seconds until ‘download_url` expires.

Returns:

  • (Integer)


155
# File 'lib/dodopayments/models/integration_config_response.rb', line 155

required :expires_in, Integer

#file_idString

Returns:

  • (String)


160
# File 'lib/dodopayments/models/integration_config_response.rb', line 160

required :file_id, String

#file_sizeInteger?

Returns:

  • (Integer, nil)


182
# File 'lib/dodopayments/models/integration_config_response.rb', line 182

optional :file_size, Integer, nil?: true

#filenameString

Returns:

  • (String)


165
# File 'lib/dodopayments/models/integration_config_response.rb', line 165

required :filename, String

#sourceString

‘“legacy”` for files in `product_files`, `“ee”` for files managed by the Entitlements Engine.

Returns:

  • (String)


172
# File 'lib/dodopayments/models/integration_config_response.rb', line 172

required :source, String