Module: BaseCRM

Defined in:
lib/basecrm/models/tag.rb,
lib/basecrm.rb,
lib/basecrm/sync.rb,
lib/basecrm/model.rb,
lib/basecrm/errors.rb,
lib/basecrm/version.rb,
lib/basecrm/envelope.rb,
lib/basecrm/http_client.rb,
lib/basecrm/models/call.rb,
lib/basecrm/models/deal.rb,
lib/basecrm/models/lead.rb,
lib/basecrm/models/meta.rb,
lib/basecrm/models/note.rb,
lib/basecrm/models/task.rb,
lib/basecrm/models/user.rb,
lib/basecrm/models/order.rb,
lib/basecrm/models/price.rb,
lib/basecrm/models/stage.rb,
lib/basecrm/models/visit.rb,
lib/basecrm/configuration.rb,
lib/basecrm/models/source.rb,
lib/basecrm/models/account.rb,
lib/basecrm/models/address.rb,
lib/basecrm/models/contact.rb,
lib/basecrm/models/product.rb,
lib/basecrm/utils/coercion.rb,
lib/basecrm/models/pipeline.rb,
lib/basecrm/models/line_item.rb,
lib/basecrm/models/sync_meta.rb,
lib/basecrm/models/sync_queue.rb,
lib/basecrm/models/deal_source.rb,
lib/basecrm/models/lead_source.rb,
lib/basecrm/models/loss_reason.rb,
lib/basecrm/paginated_resource.rb,
lib/basecrm/models/call_outcome.rb,
lib/basecrm/models/sync_session.rb,
lib/basecrm/models/text_message.rb,
lib/basecrm/models/visit_outcome.rb,
lib/basecrm/services/sync_service.rb,
lib/basecrm/services/tags_service.rb,
lib/basecrm/services/calls_service.rb,
lib/basecrm/services/deals_service.rb,
lib/basecrm/services/leads_service.rb,
lib/basecrm/services/notes_service.rb,
lib/basecrm/services/tasks_service.rb,
lib/basecrm/services/users_service.rb,
lib/basecrm/middlewares/raise_error.rb,
lib/basecrm/services/orders_service.rb,
lib/basecrm/services/stages_service.rb,
lib/basecrm/services/visits_service.rb,
lib/basecrm/services/sources_service.rb,
lib/basecrm/models/associated_contact.rb,
lib/basecrm/services/accounts_service.rb,
lib/basecrm/services/contacts_service.rb,
lib/basecrm/services/products_service.rb,
lib/basecrm/services/pipelines_service.rb,
lib/basecrm/services/line_items_service.rb,
lib/basecrm/services/deal_sources_service.rb,
lib/basecrm/services/lead_sources_service.rb,
lib/basecrm/services/loss_reasons_service.rb,
lib/basecrm/middlewares/oauth_bearer_token.rb,
lib/basecrm/models/deal_unqualified_reason.rb,
lib/basecrm/models/lead_unqualified_reason.rb,
lib/basecrm/services/call_outcomes_service.rb,
lib/basecrm/services/text_messages_service.rb,
lib/basecrm/services/visit_outcomes_service.rb,
lib/basecrm/services/associated_contacts_service.rb,
lib/basecrm/services/deal_unqualified_reasons_service.rb,
lib/basecrm/services/lead_unqualified_reasons_service.rb

Overview

WARNING: This code is auto-generated from the BaseCRM API Discovery JSON Schema

Defined Under Namespace

Modules: Envelope, Middlewares Classes: Account, AccountsService, Address, AssociatedContact, AssociatedContactsService, BaseError, Call, CallOutcome, CallOutcomesService, CallsService, Client, Coercion, Configuration, ConfigurationError, ConnectionError, Contact, ContactsService, Deal, DealSource, DealSourcesService, DealUnqualifiedReason, DealUnqualifiedReasonsService, DealsService, ErrorsCollection, HttpClient, Lead, LeadSource, LeadSourcesService, LeadUnqualifiedReason, LeadUnqualifiedReasonsService, LeadsService, LineItem, LineItemsService, LossReason, LossReasonsService, Meta, Model, Note, NotesService, Order, OrdersService, PaginatedResource, Pipeline, PipelinesService, Price, Product, ProductsService, RequestError, ResourceError, ServerError, Source, SourcesService, Stage, StagesService, Sync, SyncMeta, SyncQueue, SyncService, SyncSession, Tag, TagsService, Task, TasksService, TextMessage, TextMessagesService, User, UsersService, Visit, VisitOutcome, VisitOutcomesService, VisitsService

Constant Summary collapse

VERSION =
"1.3.9"

Instance Attribute Summary collapse

Instance Attribute Details

#activeBoolean

Returns Indicator of whether the product is active. Line items cannot be created from inactive products.

Returns:

  • (Boolean)

    Indicator of whether the product is active. Line items cannot be created from inactive products.



# File 'lib/basecrm/models/stage.rb', line 15

#addressAddress

Returns:



# File 'lib/basecrm/models/lead.rb', line 18

#amountInteger

Returns Price amount.

Returns:

  • (Integer)

    Price amount



# File 'lib/basecrm/models/price.rb', line 6

#associated_deal_idsArray<Integer>

Returns An array of ids of deals associated to the text message.

Returns:

  • (Array<Integer>)

    An array of ids of deals associated to the text message.



# File 'lib/basecrm/models/call.rb', line 12

#categoryString

Returns The unique category name of the stage.

Returns:

  • (String)

    The unique category name of the stage.



# File 'lib/basecrm/models/stage.rb', line 15

#cityString

Returns City name.

Returns:

  • (String)

    City name.



# File 'lib/basecrm/models/address.rb', line 6

#completedBoolean

Returns Indicator of whether the task is completed or not.

Returns:

  • (Boolean)

    Indicator of whether the task is completed or not.



# File 'lib/basecrm/models/task.rb', line 24

#completed_atDateTime (readonly)

Returns Date and time of the task’s completion in UTC (ISO8601 format).

Returns:

  • (DateTime)

    Date and time of the task’s completion in UTC (ISO8601 format).



# File 'lib/basecrm/models/task.rb', line 5

#confirmedBoolean (readonly)

Returns Indicates whether the user’s account has been confirmed or not.

Returns:

  • (Boolean)

    Indicates whether the user’s account has been confirmed or not.



# File 'lib/basecrm/models/user.rb', line 5

#contact_idInteger

Returns Unique identifier of the contact to be associated with the deal.

Returns:

  • (Integer)

    Unique identifier of the contact to be associated with the deal.



# File 'lib/basecrm/models/contact.rb', line 18

#contentString

Returns Content of the text message.

Returns:

  • (String)

    Content of the text message.



# File 'lib/basecrm/models/note.rb', line 18

#costInteger

Returns Cost of the product. Visible only to account administrators.

Returns:

  • (Integer)

    Cost of the product. Visible only to account administrators.



# File 'lib/basecrm/models/product.rb', line 15

#cost_currencyString

Returns Currency of the product cost, specified in 3-character currency code (ISO4217) format. Visible only to account administrators.

Returns:

  • (String)

    Currency of the product cost, specified in 3-character currency code (ISO4217) format. Visible only to account administrators.



# File 'lib/basecrm/models/product.rb', line 15

#countryString

Returns Country name.

Returns:

  • (String)

    Country name.



# File 'lib/basecrm/models/address.rb', line 6

#created_atDateTime (readonly)

Returns Date and time of creation in UTC ISO8601 format.

Returns:

  • (DateTime)

    Date and time of creation in UTC ISO8601 format.



# File 'lib/basecrm/models/tag.rb', line 5

#creator_idInteger (readonly)

Returns Unique identifier of the user the lead unqualified reason was created by.

Returns:

  • (Integer)

    Unique identifier of the user the lead unqualified reason was created by.



# File 'lib/basecrm/models/tag.rb', line 5

#currencyString

Returns Currency of value and price, specified in 3-character currency code (ISO4217) format.

Returns:

  • (String)

    Currency of value and price, specified in 3-character currency code (ISO4217) format.



# File 'lib/basecrm/models/price.rb', line 6

#custom_fieldsHash

Returns Custom fields are a key-value pair attached to a contact. See more at [Custom Fields](/docs/rest/articles/requests#custom_fields). Note! You need to set Filterable on from Settings -> Contacts to be able to search by custom fields.

Returns:

  • (Hash)

    Custom fields are a key-value pair attached to a contact. See more at [Custom Fields](/docs/rest/articles/requests#custom_fields). Note! You need to set Filterable on from Settings -> Contacts to be able to search by custom fields



# File 'lib/basecrm/models/lead.rb', line 18

#customer_statusString

Returns The customer status of the contact.

Returns:

  • (String)

    The customer status of the contact.



# File 'lib/basecrm/models/contact.rb', line 18

#deal_idInteger

Returns ID of the deal the order is associated to.

Returns:

  • (Integer)

    ID of the deal the order is associated to.



# File 'lib/basecrm/models/order.rb', line 15

#descriptionString

Returns Description of the product. Value is copied from the product.

Returns:

  • (String)

    Description of the product. Value is copied from the product.



# File 'lib/basecrm/models/lead.rb', line 18

#discountInteger

Returns Discount on the whole order in percents.

Returns:

  • (Integer)

    Discount on the whole order in percents.



# File 'lib/basecrm/models/order.rb', line 15

#due_dateDateTime

Returns Date and time of creation in UTC (ISO8601 format).

Returns:

  • (DateTime)

    Date and time of creation in UTC (ISO8601 format).



# File 'lib/basecrm/models/task.rb', line 24

#durationInteger

Returns Duration of the call in seconds.

Returns:

  • (Integer)

    Duration of the call in seconds.



# File 'lib/basecrm/models/call.rb', line 12

#emailString

Returns The contact’s email address.

Returns:

  • (String)

    The contact’s email address.



# File 'lib/basecrm/models/lead.rb', line 18

#external_idString

Returns Unique identifier of a call from an external system.

Returns:

  • (String)

    Unique identifier of a call from an external system.



# File 'lib/basecrm/models/call.rb', line 12

#facebookString

Returns The contact’s Facebook nickname.

Returns:

  • (String)

    The contact’s Facebook nickname.



# File 'lib/basecrm/models/lead.rb', line 18

#faxString

Returns The contact’s fax number.

Returns:

  • (String)

    The contact’s fax number.



# File 'lib/basecrm/models/lead.rb', line 18

#first_nameString

Returns First name of the contact.

Returns:

  • (String)

    First name of the contact.



# File 'lib/basecrm/models/lead.rb', line 18

#idInteger (readonly)

Returns Unique identifier of the lead unqualified reason.

Returns:

  • (Integer)

    Unique identifier of the lead unqualified reason.



# File 'lib/basecrm/models/tag.rb', line 5

#incomingBoolean

Returns Indicator of whether the text message was incoming or not.

Returns:

  • (Boolean)

    Indicator of whether the text message was incoming or not.



# File 'lib/basecrm/models/call.rb', line 12

#industryString

Returns The contact’s industry.

Returns:

  • (String)

    The contact’s industry.



# File 'lib/basecrm/models/lead.rb', line 18

#is_organizationBoolean

Returns Indicator of whether or not this contact refers to an organization or an individual. This value can be set only during creation and cannot be changed later. The default value is ‘false`.

Returns:

  • (Boolean)

    Indicator of whether or not this contact refers to an organization or an individual. This value can be set only during creation and cannot be changed later. The default value is ‘false`.



# File 'lib/basecrm/models/contact.rb', line 18

#last_nameString

Returns Last name of the contact. Required only if the contact is an individual.

Returns:

  • (String)

    Last name of the contact. Required only if the contact is an individual.



# File 'lib/basecrm/models/lead.rb', line 18

#likelihoodInteger

Returns The likelihood that a deal will be won, set for the stage as percentage.

Returns:

  • (Integer)

    The likelihood that a deal will be won, set for the stage as percentage.



# File 'lib/basecrm/models/stage.rb', line 15

#line1String

Returns Line 1 of the address e.g. number, street, suite, apt #, etc.

Returns:

  • (String)

    Line 1 of the address e.g. number, street, suite, apt #, etc.



# File 'lib/basecrm/models/address.rb', line 6

#linkedinString

Returns The contact’s Linkedin nickname.

Returns:

  • (String)

    The contact’s Linkedin nickname.



# File 'lib/basecrm/models/lead.rb', line 18

#made_atDateTime

Returns Date and time of when the call was made (started) in UTC (ISO8601 format).

Returns:

  • (DateTime)

    Date and time of when the call was made (started) in UTC (ISO8601 format).



# File 'lib/basecrm/models/call.rb', line 12

#max_discountInteger

Returns Maximum discount that can be applied to the product in percents.

Returns:

  • (Integer)

    Maximum discount that can be applied to the product in percents.



# File 'lib/basecrm/models/product.rb', line 15

#max_markupInteger

Returns Maximum markup that can be applied to the product in percents.

Returns:

  • (Integer)

    Maximum markup that can be applied to the product in percents.



# File 'lib/basecrm/models/product.rb', line 15

#missedBoolean

Returns Indicator of whether the call was missed (not answered) by the user or not.

Returns:

  • (Boolean)

    Indicator of whether the call was missed (not answered) by the user or not.



# File 'lib/basecrm/models/call.rb', line 12

#mobileString

Returns The contact’s mobile phone number.

Returns:

  • (String)

    The contact’s mobile phone number.



# File 'lib/basecrm/models/lead.rb', line 18

#nameString

Returns Human-friendly unqualified reason explanation.

Returns:

  • (String)

    Human-friendly unqualified reason explanation.



# File 'lib/basecrm/models/tag.rb', line 18

#organization_nameString

Returns Organization name of the lead. Required unless ‘last_name` field is provided.

Returns:

  • (String)

    Organization name of the lead. Required unless ‘last_name` field is provided.



# File 'lib/basecrm/models/lead.rb', line 18

#outcome_idInteger

Returns Unique identifier of a visit outcome.

Returns:

  • (Integer)

    Unique identifier of a visit outcome.



# File 'lib/basecrm/models/call.rb', line 12

#overdueBoolean (readonly)

Returns Indicator for whether the task has passed the ‘due_date` or not.

Returns:

  • (Boolean)

    Indicator for whether the task has passed the ‘due_date` or not.



# File 'lib/basecrm/models/task.rb', line 5

#owner_idInteger

Returns The unique identifier of the user the contact is currently assigned to.

Returns:

  • (Integer)

    The unique identifier of the user the contact is currently assigned to.



# File 'lib/basecrm/models/lead.rb', line 18

#pagesInteger (readonly)

Returns Number of pages to request.

Returns:

  • (Integer)

    Number of pages to request.



# File 'lib/basecrm/models/sync_queue.rb', line 7

#phoneString

Returns The contact’s phone number.

Returns:

  • (String)

    The contact’s phone number.



# File 'lib/basecrm/models/lead.rb', line 18

#phone_numberString

Returns Indicator of whether the call was incoming or not.

Returns:

  • (String)

    Indicator of whether the call was incoming or not.



# File 'lib/basecrm/models/call.rb', line 12

#pipeline_idInteger

Returns Unique identifier of the pipeline that contains this stage.

Returns:

  • (Integer)

    Unique identifier of the pipeline that contains this stage.



# File 'lib/basecrm/models/stage.rb', line 15

#positionInteger

Returns The stage’s position in the pipeline.

Returns:

  • (Integer)

    The stage’s position in the pipeline.



# File 'lib/basecrm/models/stage.rb', line 15

#postal_codeString

Returns Zip code or equivalent.

Returns:

  • (String)

    Zip code or equivalent.



# File 'lib/basecrm/models/address.rb', line 6

#priceInteger

Returns Price of one unit of the product. Value is copied from the product.

Returns:

  • (Integer)

    Price of one unit of the product. Value is copied from the product.



# File 'lib/basecrm/models/line_item.rb', line 24

#pricesArray<Price>

Returns Array specifying products prices in different currencies.

Returns:

  • (Array<Price>)

    Array specifying products prices in different currencies.



# File 'lib/basecrm/models/product.rb', line 15

#product_idInteger

Returns Unique identifier of the product based on which line item is created. It is not available after creation.

Returns:

  • (Integer)

    Unique identifier of the product based on which line item is created. It is not available after creation.



# File 'lib/basecrm/models/line_item.rb', line 24

#prospect_statusString

Returns The prospect status of the contact.

Returns:

  • (String)

    The prospect status of the contact.



# File 'lib/basecrm/models/contact.rb', line 18

#quantityInteger

Returns Quantity of the product included in this line item. Default value is 1.

Returns:

  • (Integer)

    Quantity of the product included in this line item. Default value is 1.



# File 'lib/basecrm/models/line_item.rb', line 24

#queuesArray<SyncQueue> (readonly)

Returns A list of sync queues.

Returns:

  • (Array<SyncQueue>)

    A list of sync queues.



# File 'lib/basecrm/models/sync_session.rb', line 7

#recording_urlString

Returns URL pointing to call recording.

Returns:

  • (String)

    URL pointing to call recording.



# File 'lib/basecrm/models/call.rb', line 12

#remind_atDateTime

Returns Date and time that we should send you a reminder in UTC (ISO8601 format).

Returns:

  • (DateTime)

    Date and time that we should send you a reminder in UTC (ISO8601 format).



# File 'lib/basecrm/models/task.rb', line 24

#rep_location_verification_statusString (readonly)

Returns The status of the location verification of the device that created the visit (sales representative).

Returns:

  • (String)

    The status of the location verification of the device that created the visit (sales representative).



# File 'lib/basecrm/models/visit.rb', line 5

#resource_addressString (readonly)

Returns Address of the visit.

Returns:

  • (String)

    Address of the visit



# File 'lib/basecrm/models/visit.rb', line 5

#resource_idInteger

Returns Unique identifier of the resource the text message is attached to.

Returns:

  • (Integer)

    Unique identifier of the resource the text message is attached to.



# File 'lib/basecrm/models/call.rb', line 12

#resource_phone_numberString (readonly)

Returns Phone number of a resource the text message was sent to/received by.

Returns:

  • (String)

    Phone number of a resource the text message was sent to/received by.



# File 'lib/basecrm/models/text_message.rb', line 5

#resource_typeString

Returns Name of a resource type the text message is attached to.

Returns:

  • (String)

    Name of a resource type the text message is attached to.



# File 'lib/basecrm/models/tag.rb', line 18

#roleString

Returns Role name.

Returns:

  • (String)

    Role name.



# File 'lib/basecrm/models/user.rb', line 5

#sent_atDateTime (readonly)

Returns Date and time of the message send time in UTC (ISO8601 format).

Returns:

  • (DateTime)

    Date and time of the message send time in UTC (ISO8601 format).



# File 'lib/basecrm/models/text_message.rb', line 5

#skuString

Returns Stock Keeping Unit identification code. Value is copied from the product.

Returns:

  • (String)

    Stock Keeping Unit identification code. Value is copied from the product.



# File 'lib/basecrm/models/product.rb', line 15

#skypeString

Returns The contact’s Skype nickname.

Returns:

  • (String)

    The contact’s Skype nickname.



# File 'lib/basecrm/models/lead.rb', line 18

#source_idInteger

Returns Unique identifier of the Source.

Returns:

  • (Integer)

    Unique identifier of the Source.



# File 'lib/basecrm/models/lead.rb', line 18

#stateString

Returns State name.

Returns:

  • (String)

    State name.



# File 'lib/basecrm/models/address.rb', line 6

#statusString

Returns Status of the user’s account. Usually ‘active`.

Returns:

  • (String)

    Status of the user’s account. Usually ‘active`.



# File 'lib/basecrm/models/lead.rb', line 18

#summaryString

Returns Summary of the visit.

Returns:

  • (String)

    Summary of the visit.



# File 'lib/basecrm/models/call.rb', line 12

#syncSyncMeta (readonly)

Returns An entity which represents sync metadata. See below for it’s attributes.

Returns:

  • (SyncMeta)

    An entity which represents sync metadata. See below for it’s attributes.



# File 'lib/basecrm/models/meta.rb', line 7

#tagsArray<String>

Returns An array of tags for the contact. See more at [Tags](/docs/rest/articles/requests#tags).

Returns:

  • (Array<String>)

    An array of tags for the contact. See more at [Tags](/docs/rest/articles/requests#tags).



# File 'lib/basecrm/models/lead.rb', line 18

#time_formatString

Returns Time format used for the account. Either 12-hour clock ‘12H` or 24-hour clock `24H`.

Returns:

  • (String)

    Time format used for the account. Either 12-hour clock ‘12H` or 24-hour clock `24H`.



# File 'lib/basecrm/models/account.rb', line 15

#timezoneString

Returns Timezone of the account as the offset from Coordinated Universal Time (UTC) in the format ‘UTC(+|-):[mm]`.

Returns:

  • (String)

    Timezone of the account as the offset from Coordinated Universal Time (UTC) in the format ‘UTC(+|-):[mm]`.



# File 'lib/basecrm/models/account.rb', line 15

#titleString

Returns The contact’s job title.

Returns:

  • (String)

    The contact’s job title.



# File 'lib/basecrm/models/lead.rb', line 18

#total_countInteger (readonly)

Returns Total number of items in the queue to synchronize.

Returns:

  • (Integer)

    Total number of items in the queue to synchronize.



# File 'lib/basecrm/models/sync_queue.rb', line 11

#twitterString

Returns The contact’s Twitter handle.

Returns:

  • (String)

    The contact’s Twitter handle.



# File 'lib/basecrm/models/lead.rb', line 18

#typeString (readonly)

Returns An entity type.

Returns:

  • (String)

    An entity type.



# File 'lib/basecrm/models/meta.rb', line 3

#upated_atDateTime (readonly)

Returns Date and time of the last update in UTC (ISO8601 format).

Returns:

  • (DateTime)

    Date and time of the last update in UTC (ISO8601 format).



# File 'lib/basecrm/models/call.rb', line 5

#updated_atDateTime (readonly)

Returns Date and time of the last update in UTC ISO8601 format.

Returns:

  • (DateTime)

    Date and time of the last update in UTC ISO8601 format.



# File 'lib/basecrm/models/tag.rb', line 5

#user_idInteger

Returns Unique identifier of a user who sent/received a text message.

Returns:

  • (Integer)

    Unique identifier of a user who sent/received a text message.



# File 'lib/basecrm/models/call.rb', line 12

#user_phone_numberString (readonly)

Returns Phone number of a user who sent/received a text message.

Returns:

  • (String)

    Phone number of a user who sent/received a text message.



# File 'lib/basecrm/models/text_message.rb', line 5

#valueInteger

Returns Value of one unit of the product. It is product’s price after applying markup.

Returns:

  • (Integer)

    Value of one unit of the product. It is product’s price after applying markup.



# File 'lib/basecrm/models/line_item.rb', line 24

#variationInteger

Returns Variation of the product’s price for this line item. Value of 5 means that 5% markup is added, -10 means there is a 10% discount.

Returns:

  • (Integer)

    Variation of the product’s price for this line item. Value of 5 means that 5% markup is added, -10 means there is a 10% discount.



# File 'lib/basecrm/models/line_item.rb', line 24

#websiteString

Returns The contact’s website address.

Returns:

  • (String)

    The contact’s website address.



# File 'lib/basecrm/models/lead.rb', line 18