Class: Zavudev::Resources::Number10dlc::Brands

Inherits:
Object
  • Object
show all
Defined in:
lib/zavudev/resources/number_10dlc/brands.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Brands

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Brands.

Parameters:



245
246
247
# File 'lib/zavudev/resources/number_10dlc/brands.rb', line 245

def initialize(client:)
  @client = client
end

Instance Method Details

#create(city:, country:, display_name:, email:, entity_type:, phone:, postal_code:, state:, street:, vertical:, company_name: nil, ein: nil, first_name: nil, last_name: nil, stock_exchange: nil, stock_symbol: nil, website: nil, request_options: {}) ⇒ Zavudev::Models::Number10dlc::BrandCreateResponse

Create a 10DLC brand registration. The brand starts in draft status. Submit it for review using the submit endpoint.

Parameters:

  • city (String)
  • country (String)

    Two-letter ISO country code.

  • display_name (String)

    Display name of the brand.

  • email (String)
  • entity_type (Symbol, Zavudev::Models::Number10dlc::BrandCreateParams::EntityType)

    Business entity type for 10DLC brand registration.

  • phone (String)

    Contact phone in E.164 format.

  • postal_code (String)
  • state (String)
  • street (String)
  • vertical (String)

    Industry vertical.

  • company_name (String)

    Legal company name.

  • ein (String)

    Employer Identification Number (format: XX-XXXXXXX).

  • first_name (String)
  • last_name (String)
  • stock_exchange (String)
  • stock_symbol (String)
  • website (String)
  • request_options (Zavudev::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



51
52
53
54
55
56
57
58
59
60
# File 'lib/zavudev/resources/number_10dlc/brands.rb', line 51

def create(params)
  parsed, options = Zavudev::Number10dlc::BrandCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "v1/10dlc/brands",
    body: parsed,
    model: Zavudev::Models::Number10dlc::BrandCreateResponse,
    options: options
  )
end

#delete(brand_id, request_options: {}) ⇒ nil

Delete 10DLC brand

Parameters:

Returns:

  • (nil)

See Also:



173
174
175
176
177
178
179
180
# File 'lib/zavudev/resources/number_10dlc/brands.rb', line 173

def delete(brand_id, params = {})
  @client.request(
    method: :delete,
    path: ["v1/10dlc/brands/%1$s", brand_id],
    model: NilClass,
    options: params[:request_options]
  )
end

#list(cursor: nil, limit: nil, request_options: {}) ⇒ Zavudev::Internal::Cursor<Zavudev::Models::Number10dlc::TenDlcBrand>

List 10DLC brand registrations for this project.

Parameters:

Returns:

See Also:



149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/zavudev/resources/number_10dlc/brands.rb', line 149

def list(params = {})
  parsed, options = Zavudev::Number10dlc::BrandListParams.dump_request(params)
  query = Zavudev::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "v1/10dlc/brands",
    query: query,
    page: Zavudev::Internal::Cursor,
    model: Zavudev::Number10dlc::TenDlcBrand,
    options: options
  )
end

#list_use_cases(request_options: {}) ⇒ Zavudev::Models::Number10dlc::BrandListUseCasesResponse

List available use cases for 10DLC campaign registration.

Parameters:

Returns:

See Also:



191
192
193
194
195
196
197
198
# File 'lib/zavudev/resources/number_10dlc/brands.rb', line 191

def list_use_cases(params = {})
  @client.request(
    method: :get,
    path: "v1/10dlc/brands/use-cases",
    model: Zavudev::Models::Number10dlc::BrandListUseCasesResponse,
    options: params[:request_options]
  )
end

#retrieve(brand_id, request_options: {}) ⇒ Zavudev::Models::Number10dlc::BrandRetrieveResponse

Get 10DLC brand

Parameters:

Returns:

See Also:



73
74
75
76
77
78
79
80
# File 'lib/zavudev/resources/number_10dlc/brands.rb', line 73

def retrieve(brand_id, params = {})
  @client.request(
    method: :get,
    path: ["v1/10dlc/brands/%1$s", brand_id],
    model: Zavudev::Models::Number10dlc::BrandRetrieveResponse,
    options: params[:request_options]
  )
end

#submit(brand_id, request_options: {}) ⇒ Zavudev::Models::Number10dlc::BrandSubmitResponse

Submit a draft brand to The Campaign Registry (TCR) for vetting. The brand must be in draft status. A $35 registration fee is charged from your balance.

Parameters:

Returns:

See Also:



212
213
214
215
216
217
218
219
# File 'lib/zavudev/resources/number_10dlc/brands.rb', line 212

def submit(brand_id, params = {})
  @client.request(
    method: :post,
    path: ["v1/10dlc/brands/%1$s/submit", brand_id],
    model: Zavudev::Models::Number10dlc::BrandSubmitResponse,
    options: params[:request_options]
  )
end

#sync_status(brand_id, request_options: {}) ⇒ Zavudev::Models::Number10dlc::BrandSyncStatusResponse

Sync the brand status with the registration provider. Use this to check for approval updates after submission.

Parameters:

Returns:

See Also:



233
234
235
236
237
238
239
240
# File 'lib/zavudev/resources/number_10dlc/brands.rb', line 233

def sync_status(brand_id, params = {})
  @client.request(
    method: :post,
    path: ["v1/10dlc/brands/%1$s/sync", brand_id],
    model: Zavudev::Models::Number10dlc::BrandSyncStatusResponse,
    options: params[:request_options]
  )
end

#update(brand_id, city: nil, company_name: nil, country: nil, display_name: nil, ein: nil, email: nil, entity_type: nil, first_name: nil, last_name: nil, phone: nil, postal_code: nil, state: nil, stock_exchange: nil, stock_symbol: nil, street: nil, vertical: nil, website: nil, request_options: {}) ⇒ Zavudev::Models::Number10dlc::BrandUpdateResponse

Update a 10DLC brand in draft status. Cannot update after submission.

Parameters:

  • brand_id (String)

    10DLC brand ID.

  • city (String)
  • company_name (String)
  • country (String)
  • display_name (String)
  • ein (String)
  • email (String)
  • entity_type (Symbol, Zavudev::Models::Number10dlc::BrandUpdateParams::EntityType)

    Business entity type for 10DLC brand registration.

  • first_name (String)
  • last_name (String)
  • phone (String)
  • postal_code (String)
  • state (String)
  • stock_exchange (String)
  • stock_symbol (String)
  • street (String)
  • vertical (String)
  • website (String)
  • request_options (Zavudev::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



127
128
129
130
131
132
133
134
135
136
# File 'lib/zavudev/resources/number_10dlc/brands.rb', line 127

def update(brand_id, params = {})
  parsed, options = Zavudev::Number10dlc::BrandUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["v1/10dlc/brands/%1$s", brand_id],
    body: parsed,
    model: Zavudev::Models::Number10dlc::BrandUpdateResponse,
    options: options
  )
end