Issues an API request to create a new account transaction.
4007
public function createTransaction(Transaction $transaction, array $params = [])
    {
        $this->getClient()->createAccountTransaction($this, $transaction, $params);
    }
421798
def post_accounts(new_account)
      @options = {path: '/accounts/content',
                  body:  Megam::JSONCompat.to_json(new_account)}.merge(@options)

      request(
        :expects  => 201,
        :method   => :post,
        :body     => @options[:body]
        )
    end
1312535
function Account (client, opts) {
  var self = this
  if (!(self instanceof Account)) return new Account(client, opts)
  if (!opts) opts = {}

  self.client = client
}
497048
@RequestMapping(value = "create", method = RequestMethod.POST)
    public Account create(@RequestBody @Valid AccountInput input) {
        return accountService.create(input);
    }
623412
function create(callback, payee, name) {
  if(!util.isFunction(callback)) {
    throw new Error('callback must be a function');
  }

  var resource = this.coinjar.personal.api_endpoint + '/v1/contacts.json',
    query = {
      contact : {}
    };

  if(payee) { query.contact.payee = payee; }
  if(name) { query.contact.name = name; }

  request.post(resource)
    .auth(this.coinjar.personal.auth_token)
    .send(query)
    .end(function (response) {
      if(isResponseError(response, callback)) { return; }
      return callback(null, response.body.contact);
    });
}
902085
def _request(self, action='GET', url='/', data=None, query_params=None):
        
        if data is None:
            data = {}
        if query_params is None:
            query_params = {}
        response = self.session.request(action, self.api[self.account]['endpoint'] + url,
                                        params=query_params, data=data)
        response.raise_for_status()
        return response
710493
def receive_request(self, transaction):
        

        transaction.cached_element = self.cache.search_response(transaction.request)
        if transaction.cached_element is None:
            transaction.cacheHit = False
        else:
            transaction.response = transaction.cached_element.cached_response
            transaction.response.mid = transaction.request.mid
            transaction.cacheHit = True

            age = transaction.cached_element.creation_time + transaction.cached_element.max_age - time.time()
            if transaction.cached_element.freshness is True:
                if age <= 0:
                    logger.debug("resource not fresh")
                    """
                    if the resource is not fresh, its Etag must be added to the request so that the server might validate it instead of sending a new one
                    """
                    transaction.cached_element.freshness = False
                    """
                    ensuring that the request goes to the server
                    """
                    transaction.cacheHit = False
                    logger.debug("requesting etag %s", transaction.response.etag)
                    transaction.request.etag = transaction.response.etag
                else:
                    transaction.response.max_age = age
            else:
                transaction.cacheHit = False
        return transaction
515101
def complete_request(self, account_id, request_id, **params):
        """"""
        response = self._post(
            'v2', 'accounts', account_id, 'transactions', request_id,
            'complete', data=params)
        return self._make_api_object(response, APIObject)
1092613
def newaccount(ctx, accountname, account, password):
    
    print_tx(
        ctx.bitshares.create_account(accountname, registrar=account, password=password)
    )
1054335
public void newTransactionHandler(PersistedTransaction tx, PersistedV2Key key) throws Exception {
        listenForUpdates(tx);
        tx.keyId = key.getId();
        tx.walletId = this.descriptor.getKey();
        tx.account = key.account;
        System.out.println("Incoming transaction captured in API service: " + tx.toString());
        transactionDAO.create(tx);
        WalletChange change = new WalletChange(tx.value, getBalance(), createKey(key.account).address, tx);
        WalletChangeMessage out = new WalletChangeMessage();
        out.setCommand(Command.BALANCE_CHANGE_RECEIVED);
        out.setKey(this.descriptor.key);
        out.setPayload(change);
        router.sendUpdate(this.descriptor.key, out);
    }
1072790
def make_transaction(self):
        
        if self.pk:
            raise CannotRecreateTransactionOnRecurredCost(
                'The transaction for this recurred cost has already been created. You cannot create it again.'
            )

        amount = self.recurring_cost.get_amount(self.billing_cycle)

        # It is quite possible that there will be nothing to bill, in which
        # case we cannot create a transaction with no legs, nor can we create
        # legs with zero values. Therefore we don't create any transaction.
        if not amount:
            return None

        self.transaction = Transaction.objects.create(
            description='Created by recurring cost',
            date=self.billing_cycle.date_range.lower
        )

        # Use the SplitManager's custom queryset's split() method to get the
        # amount to be billed for each split
        splits = self.recurring_cost.splits.all().split(amount)

        # Create the transaction leg for the outbound funds
        # (normally to an expense account)
        self.transaction.legs.add(Leg.objects.create(
            transaction=self.transaction,
            amount=Money(amount, self.recurring_cost.currency),
            account=self.recurring_cost.to_account,
        ))

        for split, split_amount in splits:
            # Create the transaction legs for the inbound funds
            # (from housemate accounts)
            if split_amount:
                self.transaction.legs.add(Leg.objects.create(
                    transaction=self.transaction,
                    amount=Money(split_amount * -1, self.recurring_cost.currency),
                    account=split.from_account,
                ))

        return self.transaction
304211
def create destination_account, destination_amount
      payment = Payment.new
      payment.account = account
      payment.destination_account = destination_account.to_s
      payment.destination_amount = Amount.from_string(destination_amount)
      payment
    end
1354154
def create_order_with_token(request):
    
    # Get the request data
    try:
        address = request.data['address']
        shipping_option = request.data.get('shipping_option', None)
        email = request.data['email']
        transaction_id = request.data['transaction_id']
    except KeyError:
        return Response(data={"message": "Missing parameters from request data"},
                        status=status.HTTP_400_BAD_REQUEST)

    # Create the order
    order = create_order(
        email,
        request,
        addresses=address,
        shipping_option=shipping_option,
    )

    order.payment_date = timezone.now()
    order.transaction_id = transaction_id
    order.save()
    # Once the order has been successfully taken, we can empty the basket
    destroy_basket(request)

    return Response(data={"order_id": order.id}, status=status.HTTP_201_CREATED)
285471
def customer_transaction_request(amount, creditcard, gateway_options)
      { 'Command' => 'Sale',
        'ClientIP' => gateway_options[:ip],
        'isRecurring' => false,
        'Details' => transaction_details(amount, creditcard, gateway_options) }
    end
217292
public Optional<PartnerAccount> create(long partnerId, PartnerAccount account)
    {
        return HTTP.POST(String.format("/v2/partners/%d/accounts", partnerId), account, PARTNER_ACCOUNT);
    }
1025479
public BankAccount create(BankAccount bankAccount, String customerId) throws BaseException {

		logger.debug("Enter BankAccountService::create");
		
		if (StringUtils.isBlank(customerId)) {
			logger.error("IllegalArgumentException {}", customerId);
			throw new IllegalArgumentException("customerId cannot be empty or null");
		}

		// prepare API url
		String apiUrl = requestContext.getBaseUrl().replaceAll("payments", "customers") + "{id}/bank-accounts"
				.replaceAll("\\{format\\}", "json").replaceAll("\\{" + "id" + "\\}", customerId.toString());
		logger.info("apiUrl - " + apiUrl);
		
		// assign TypeReference for deserialization
		TypeReference<BankAccount> typeReference = new TypeReference<BankAccount>() {
		};

		// prepare service request
		Request request = new Request.RequestBuilder(MethodType.POST, apiUrl).requestObject(bankAccount)
				.typeReference(typeReference).context(requestContext).build();

		// make API call
		Response response = sendRequest(request);
		// retrieve response
		BankAccount bankAccountResponse = (BankAccount) response.getResponseObject();

		// set additional attributes
		prepareResponse(request, response, bankAccountResponse);
		return bankAccountResponse;
	}
278287
public AbucoinsCreateOrderResponse createAbucoinsOrder(AbucoinsBaseCreateOrderRequest req)
      throws IOException {
    AbucoinsCreateOrderResponse resp =
        abucoinsAuthenticated.createOrder(
            exchange.getExchangeSpecification().getApiKey(),
            signatureCreator,
            exchange.getExchangeSpecification().getPassword(),
            timestamp(),
            req);
    if (resp.getMessage() != null) throw new ExchangeException(resp.getMessage());

    return resp;
  }